:root {
  --ink: #1d1b18;
  --muted: #5d5850;
  --paper: #faf8f3;
  --line: #d9d3c7;
  --accent: #6b3e1f;
  --error: #9b1c1c;
  --notice: #2f5d2a;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
}

body {
  margin: 0;
  line-height: 1.5;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

main {
  max-width: 40rem;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

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

form.inline {
  display: inline;
  margin: 0;
}

button {
  font: inherit;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--accent);
  color: #fff;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 24rem;
}

.account-form label {
  margin-top: 0.6rem;
  font-weight: bold;
}

.account-form label.check {
  font-weight: normal;
}

.account-form input:not([type="checkbox"]) {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.account-form button {
  align-self: flex-start;
  margin-top: 1rem;
}

.account-form small {
  color: var(--muted);
}

.error,
.errors {
  color: var(--error);
}

.errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.notice {
  color: var(--notice);
}

.links {
  padding-left: 1.2rem;
}

.account-form textarea,
.account-form select {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  max-width: 40rem;
  margin: 3rem auto 1.5rem;
  padding: 0.75rem 1.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.legal address {
  font-style: normal;
}

.admin-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table .actions {
  white-space: nowrap;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input {
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.account-form.wide {
  max-width: 100%;
}

.pager {
  display: flex;
  gap: 1rem;
}

.announcement-body {
  white-space: pre-line;
}

.game-actions {
  margin: 1rem 0;
}

.leave-form {
  margin: 1rem 0;
}

.admin-table tr.viewer td {
  font-weight: bold;
}

.round-log,
.chat {
  padding-left: 1.5rem;
}

.chat {
  list-style: none;
  padding-left: 0;
}

.chat li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.chat-meta {
  display: block;
}

.chat-body {
  white-space: pre-line;
}

.help-index dt {
  margin-top: 0.6rem;
  font-weight: bold;
}

.help-index dd {
  margin-left: 0;
}

.help-summary {
  font-style: italic;
}

/* A glossary term: its explanation opens in a bubble on hover and on keyboard focus, and Escape closes it (site.js). */
.term-tip {
  position: relative;
  border-bottom: 1px dotted var(--accent);
  cursor: help;
}

.term-tip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.term-tip-bubble {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  width: max-content;
  max-width: 18rem;
  margin-top: 0.3rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: normal;
  font-style: normal;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.term-tip:hover .term-tip-bubble,
.term-tip:focus .term-tip-bubble,
.term-tip:focus-within .term-tip-bubble {
  display: block;
}

.term-tip.is-closed .term-tip-bubble {
  display: none;
}
