/* play.edrath.online: dark oak boards, a copy-sheet page, Greenwood's moss green for actions.
   Fonts are the game's own (assets/fonts, SIL OFL). Small caps only for headings. */

@font-face { font-family: "Alegreya SC"; src: url("/fonts/AlegreyaSC-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/AlegreyaSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/AlegreyaSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/fonts/AlegreyaSans-Italic.ttf") format("truetype"); font-style: italic; font-display: swap; }

:root {
  --oak: #1c1611;
  --oak-light: #221b15;
  --seam: #110d09;
  --sheet: #eee3c8;
  --sheet-edge: #c7b083;
  --field: #faf4e4;
  --ink: #2a2118;
  --ink-soft: #5d4e3c;
  --moss: #4b6a34;
  --moss-hover: #587b3d;
  --lantern: #e2b866;
  --error: #8b2c1b;
  --error-bg: #f3d9cd;
  --note-bg: #e1e8cf;
}

* { box-sizing: border-box; }

html { background: var(--oak); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 17px/1.5 "Alegreya Sans", "Segoe UI", sans-serif;
  /* Wide oak boards with dark seams, the way the inn walls are built. */
  background:
    repeating-linear-gradient(90deg,
      var(--oak) 0, var(--oak) 157px, var(--seam) 157px, var(--seam) 159px,
      var(--oak-light) 159px, var(--oak-light) 311px, var(--seam) 311px, var(--seam) 313px);
}

a { color: var(--moss); }
a:hover { color: var(--moss-hover); }

.banner {
  position: relative;
  height: 210px;
  background: #182224 url("/img/greenrise-dusk.jpg") center 40% / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--seam);
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 13, 9, 0.15) 0%, rgba(17, 13, 9, 0.55) 100%);
}
.banner a { position: relative; z-index: 1; display: block; line-height: 0; }
.banner img { width: 295px; height: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)); }

.signed-in {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #efe3c8;
  font-size: 15px;
  text-shadow: 0 1px 2px #000;
}
.signed-in a { color: #efe3c8; }
.signed-in form { margin: 0; }
.signed-in button {
  background: none;
  border: 0;
  padding: 0;
  color: #efe3c8;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: -34px auto 40px;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}
main.wide { max-width: 660px; }

.sheet {
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
  border-radius: 3px;
  padding: 28px 32px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.sheet + .sheet { margin-top: 18px; }

h1, h2 {
  font-family: "Alegreya SC", Georgia, serif;
  font-weight: 700;
  color: #34281b;
  margin: 0 0 6px;
  line-height: 1.15;
}
h1 { font-size: 30px; }
h2 { font-size: 22px; margin-top: 4px; }
h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 8px;
  background: var(--moss);
}

p { margin: 10px 0; }
.lead { color: var(--ink-soft); margin-top: 12px; }
.small { font-size: 15px; color: var(--ink-soft); }

form.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 14px; margin-top: 3px; }

input[type=email], input[type=text], input[type=password] {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid #b59f74;
  border-radius: 3px;
}
input:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--moss); outline-offset: 1px; }

.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }

.button, button.button {
  display: inline-block;
  padding: 10px 20px;
  font: 700 17px "Alegreya Sans", sans-serif;
  color: #f4ecd8;
  background: var(--moss);
  border: 1px solid #3a5428;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.button:hover { background: var(--moss-hover); color: #fff8e6; }
.button.quiet { background: transparent; color: var(--ink); border-color: #a08a60; }
.button.quiet:hover { background: #e6d8b8; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

.error, .validation-summary-errors {
  background: var(--error-bg);
  color: var(--error);
  border-left: 3px solid var(--error);
  padding: 8px 12px;
  border-radius: 2px;
}
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.field-error { color: var(--error); font-size: 15px; margin-top: 3px; display: block; }
.note {
  background: var(--note-bg);
  border-left: 3px solid var(--moss);
  padding: 8px 12px;
  border-radius: 2px;
}

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 4px; }
dl.facts dt { font-weight: 700; color: var(--ink-soft); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

.status { font-weight: 700; }
.status.yes { color: var(--moss); }
.status.no { color: #8a5a1c; }

table.launchers { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
table.launchers th, table.launchers td { text-align: left; padding: 5px 6px; border-bottom: 1px solid #d5c39c; }

/* Invites and account security (issue #100) */
.share-link {
  display: block;
  width: 100%;
  padding: 9px 11px;
  font: 15px/1.4 Consolas, "Courier New", monospace;
  color: var(--ink);
  background: var(--field);
  border: 1px dashed #b59f74;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.meter { font-weight: 700; color: var(--ink-soft); }
form.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0 4px; }
form.inline > div { flex: 1 1 220px; }
form.inline .button { padding: 9px 16px; }
table.launchers form { margin: 0; }
.button.small-button { padding: 3px 10px; font-size: 14px; }
.button.danger { background: #8b2c1b; border-color: #6b1f12; }
.button.danger:hover { background: #a2361f; }
details.fold { margin-top: 16px; border-top: 1px solid #d5c39c; padding-top: 10px; }
details.fold > summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details.fold[open] > summary { margin-bottom: 4px; }
.status.gone { color: var(--ink-soft); font-weight: 400; }
altcha-widget { display: block; margin: 2px 0; }

footer {
  text-align: center;
  color: #9d8e74;
  font-size: 14px;
  padding: 0 16px 26px;
}
footer a { color: #c7b58f; }

/* Terms and privacy (issue #97) */
main.legal { max-width: 760px; }
.version-line { color: var(--ink-soft); margin-top: 12px; }
.toc { margin: 16px 0 10px; padding: 10px 14px; border: 1px solid var(--sheet-edge); border-radius: 3px; background: #f4ecd8; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2; column-gap: 24px; font-size: 15px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.legal-section { scroll-margin-top: 12px; margin-top: 22px; }
.legal-section h2 { font-size: 20px; }
.terms-prompt h2 { font-size: 20px; margin-bottom: 4px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

@media (max-width: 520px) {
  .banner { height: 160px; }
  .banner img { width: 230px; }
  .sheet { padding: 22px 18px 24px; }
  .signed-in { top: 8px; right: 10px; font-size: 14px; }
}
