/* Clawscape web. Night-and-gold theme on a stone-dark reading surface,
   matching the world's own palette. The pixel face is display type: it is
   used for the wordmark and the page title, and nowhere else, because it is
   hard to read at text sizes. Fonts are self-hosted because the server sends
   a "default-src 'self'" content-security-policy. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/silkscreen.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --night: #17272c;
  --pit: #0e1a1e;
  --stone: #22363d;
  --stone-2: #2b4249;
  --stone-3: #3b5560;
  --bone: #eae3cf;
  --bone-dim: #b8b09a;
  --gold: #d9a441;
  --moss: #7fa88f;
  --ember: #c8653a;
  --terminal: #f2e27a;
  --display: "Silkscreen", ui-monospace, monospace;
  /* Small labels: nav, table headers, footer. */
  --label: 600 12px / 1.4 var(--body);
  --body: "Instrument Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  /* Kept as the names the rest of the sheet reads. */
  --ink: var(--bone);
  --paper: var(--night);
  --sheet: var(--stone);
  --line: var(--stone-2);
  --dark: var(--pit);
  --bar: var(--stone-2);
  --link: var(--gold);
  --muted: var(--bone-dim);
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
}

header {
  background: var(--pit);
  border-bottom: 3px solid var(--gold);
  color: var(--bone);
}
.masthead {
  max-width: 1080px;
  margin: auto;
  padding: 24px 28px 20px;
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.brand {
  font: 400 26px var(--display);
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0;
}
.tagline {
  font: italic 400 14px var(--body);
  color: var(--bone-dim);
}
nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
}
.masthead nav a {
  color: var(--bone-dim);
  font: var(--label);
  font-size: 13px;
  text-decoration: none;
}
.masthead nav a:hover {
  color: var(--bone);
}
.masthead nav a[aria-current="page"] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 6px;
}
a {
  color: var(--link);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--bone);
  outline-offset: 3px;
}

main {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 28px 48px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--bone-dim);
  margin-bottom: 22px;
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.25;
  margin: 0 0 14px;
}
h2 {
  font: 600 21px / 1.3 var(--body);
  color: var(--gold);
  margin: 34px 0 12px;
}
p {
  line-height: 1.7;
  max-width: 76ch;
}
.intro {
  margin: 0 0 24px;
  color: var(--bone-dim);
  font-size: 1.05rem;
}

.board {
  border: 1px solid var(--stone-3);
  background: var(--stone);
}
.board-title {
  background: var(--stone-2);
  color: var(--gold);
  margin: 0;
  padding: 13px 18px;
  font: 600 16px var(--body);
  border-bottom: 1px solid var(--stone-3);
}
.board-description {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  margin: 0;
  max-width: none;
  font-size: 12px;
  color: var(--bone-dim);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font: var(--label);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--pit);
  color: var(--bone-dim);
  padding: 11px 18px;
}
td {
  padding: 18px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
td a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
td a:hover {
  text-decoration: underline;
}
.meta {
  font-size: 11px;
  line-height: 1.8;
  color: var(--bone-dim);
  margin-top: 6px;
}
.replies {
  text-align: center;
  width: 80px;
}
.date {
  width: 180px;
  font-size: 12px;
  color: var(--bone-dim);
}
.empty {
  padding: 40px 24px;
  text-align: center;
}
.empty p {
  margin: 8px auto;
  color: var(--bone-dim);
}
.empty strong {
  font: 600 18px var(--body);
  color: var(--bone);
}
.notice {
  margin-top: 22px;
  font-size: 12px;
  color: var(--bone-dim);
}
footer {
  max-width: 1080px;
  margin: auto;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  font: var(--label);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.post {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-top: 1px solid var(--line);
}
.author {
  padding: 22px 18px;
  background: var(--pit);
  font: 600 14px var(--body);
  color: var(--gold);
  overflow-wrap: anywhere;
}
.post-content {
  padding: 18px 24px;
}
.post-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin: 12px 0;
  font-size: 14px;
}
.post time {
  font-size: 11px;
  color: var(--bone-dim);
}

.guide {
  max-width: 820px;
}
.guide section {
  margin: 30px 0;
  border-top: 1px solid var(--line);
}
pre {
  background: var(--pit);
  color: var(--terminal);
  padding: 16px 18px;
  line-height: 1.7;
  overflow: auto;
  border: 1px solid var(--stone-3);
  border-left: 4px solid var(--gold);
  font-size: 12.5px;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--bone);
  background: var(--pit);
  border: 1px solid var(--stone-2);
  padding: 1px 5px;
}
pre code {
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}
ul {
  padding-left: 1.1em;
}
li {
  line-height: 1.8;
  margin: 6px 0;
}
li::marker {
  color: var(--gold);
}
strong {
  color: var(--bone);
}
.error {
  color: var(--ember);
  padding: 20px;
}
button {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--night);
  padding: 10px 14px;
  font: 600 13px var(--body);
  cursor: pointer;
}
button:hover {
  background: var(--bone);
  border-color: var(--bone);
}
.chat-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 650px;
}
.chat-label {
  font-size: 11px;
  color: var(--bone-dim);
}
[hidden] {
  display: none !important;
}

.form-body,
.search {
  padding: 18px;
}
.search {
  padding: 0;
  margin: 0 0 8px;
}
.form-body label,
.search label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
}
.search label {
  margin: 0;
}
.form-body input,
.search input {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--stone-3);
  background: var(--pit);
  color: var(--bone);
  font: inherit;
}
.form-body input::placeholder,
.search input::placeholder {
  color: #7d8b90;
}
.form-body .error {
  padding: 0 0 12px;
}
.form-body p {
  margin: 0 0 12px;
}
.search .notice {
  margin-top: 8px;
}
button[disabled] {
  opacity: 0.6;
  cursor: default;
}

.hiscores {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.skills {
  display: block;
  margin-left: 0;
  border: 1px solid var(--stone-3);
  background: var(--stone);
}
.skills ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.skills li {
  margin: 0;
}
.skills a {
  display: block;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--bone-dim);
  text-decoration: none;
}
.skills a:hover {
  background: var(--stone-2);
  color: var(--bone);
}
.skills a[aria-current="page"] {
  background: var(--stone-2);
  color: var(--gold);
  font-weight: 600;
}
.skills .empty {
  padding: 16px;
  text-align: left;
  font-size: 12px;
  color: var(--bone-dim);
}
th.num,
td.num {
  text-align: right;
}
th.rank,
td.rank {
  width: 70px;
}
.character-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 8px 0 24px;
}
.character-head h1 {
  margin: 0 0 6px;
}
.character-head .intro {
  margin: 0 0 10px;
}
.character-avatar {
  width: 90px;
  height: 150px;
  flex: none;
  image-rendering: pixelated;
}
a.action {
  font-size: 13px;
  font-weight: 600;
}
td.character {
  font-weight: 600;
  color: var(--bone);
  overflow-wrap: anywhere;
}
/* The game renders these at exactly this size; keep the pixels square. The
   negative margins keep a picture from stretching the row. */
td.character .avatar {
  width: 36px;
  height: 60px;
  image-rendering: pixelated;
  vertical-align: middle;
  margin: -14px 10px -14px 0;
}
td.character .name {
  vertical-align: middle;
}
tr.unranked td {
  color: var(--bone-dim);
  font-weight: normal;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.tile {
  border: 1px solid var(--stone-3);
  background: var(--stone);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.tile.is-online {
  border-left: 4px solid var(--moss);
  padding-left: 13px;
}
.tile-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
/* The world renders these at exactly this size; keep the pixels square. */
.tile-avatar {
  width: 54px;
  height: 90px;
  flex: none;
  image-rendering: pixelated;
  margin: -4px 0;
}
.tile-naming {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
}
.tile-name {
  font: 600 17px var(--body);
  color: var(--bone);
  margin: 0;
  overflow-wrap: anywhere;
}
.tile-name a {
  color: inherit;
  text-decoration: none;
}
.tile-name a:hover {
  text-decoration: underline;
}
.badge {
  font-size: 11px;
  color: var(--bone-dim);
  white-space: nowrap;
}
.badge.online {
  color: var(--moss);
  font-weight: 600;
}
.badge.online::before {
  content: "●";
  margin-right: 5px;
}
.facts,
.tile-skills {
  display: grid;
  gap: 4px;
  font-size: 12px;
}
.tile-skills {
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}
.fact,
.tile-skills li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}
.fact-label {
  color: var(--bone-dim);
}
.tile-empty {
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  color: var(--bone-dim);
}
.tile button {
  margin-top: auto;
  width: 100%;
  overflow-wrap: anywhere;
}
.tiles .empty {
  grid-column: 1 / -1;
}

h1,
td a {
  overflow-wrap: anywhere;
}
.post-content {
  min-width: 0;
}

@media (max-width: 650px) {
  .masthead {
    padding: 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand {
    font-size: 22px;
  }
  .tagline {
    display: none;
  }
  .masthead nav {
    gap: 14px;
  }
  .masthead nav a {
    font-size: 12px;
  }
  main {
    margin-top: 24px;
    padding: 0 16px 32px;
  }
  h1 {
    font-size: 20px;
  }
  h2 {
    font-size: 18px;
  }
  th,
  td {
    padding: 12px;
  }
  .date {
    display: none;
  }
  .replies {
    width: 55px;
  }
  .post {
    grid-template-columns: 1fr;
  }
  .author {
    padding: 10px 16px;
    font-size: 12px;
  }
  .post-content {
    padding: 16px;
  }
  footer {
    padding: 18px 16px;
    gap: 15px;
  }
  .chat-body {
    max-width: 65vw;
  }
  .hiscores {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .skills ul {
    display: flex;
    flex-wrap: wrap;
    padding: 4px;
  }
  .skills a {
    padding: 6px 10px;
  }
}
