@import url("/css/fable.css?v=1");
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* A life as cloth: undyed linen, and five dyes. */
:root {
  --linen: #e7e1d4;
  --linen-deep: #d6cdbb;
  --ink: #1b2148;
  --moss: #5f8f52;
  --weld: #e0ae2f;
  --madder: #b5394a;
  --indigo: #2b458f;
  --umber: #8b6a45;
  --f-bg: var(--linen);
  --f-ink: var(--ink);
  --f-soft: rgba(27, 33, 72, 0.74);
  --f-line: rgba(27, 33, 72, 0.22);
  --f-surface: #f3efe6;
  --f-accent: var(--ink);
  --f-on-accent: var(--linen);
  --f-warn: #a02035;
  --f-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
}
body {
  min-height: 100%;
  height: auto;
  background:
    repeating-linear-gradient(0deg, rgba(27, 33, 72, 0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(27, 33, 72, 0.035) 0 1px, transparent 1px 4px), var(--linen);
  font-size: 17px;
}
.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1040px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 18px 10px;
}
.home {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.crumb {
  padding-left: 14px;
  border-left: 1px solid var(--f-line);
  color: var(--f-soft);
  font-size: 15px;
  text-decoration: none;
}
.bar nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.chip {
  background: var(--f-surface);
}
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 18px 48px;
}
.loom {
  margin: 4px 0 0;
}
#weave {
  display: block;
  width: 100%;
  height: clamp(96px, 16vw, 150px);
  border-top: 5px solid var(--ink);
  border-bottom: 5px solid var(--ink);
  background: var(--linen-deep);
}
.loom figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--f-soft);
}
.key i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  background: var(--c);
  vertical-align: -1px;
}
.key.note {
  margin-left: auto;
}

h1,
h2 {
  font-family: var(--f-display);
  margin: 0;
}
.start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 20px 48px;
  align-items: start;
  margin-top: 30px;
}
#title {
  font-size: clamp(72px, 15vw, 190px);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.05em;
}
.lede {
  grid-column: 1;
  max-width: 34ch;
  margin: 0;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.4;
}
#begin {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--f-surface);
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 19px;
}
.wishes {
  display: grid;
  gap: 8px;
}
.wish {
  position: relative;
  display: block;
}
.wish input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.wish span {
  display: block;
  padding: 10px 14px;
  border: 2px solid var(--f-line);
  border-radius: 6px;
  line-height: 1.3;
}
.wish b {
  display: block;
  font-size: 18px;
}
.wish small {
  font-size: 15px;
  color: var(--f-soft);
}
.wish input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--linen);
}
.wish input:checked + span small {
  color: rgba(231, 225, 212, 0.8);
}
.wish input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.field-label {
  display: block;
  margin: 16px 0 6px;
  font-size: 15px;
  font-weight: 600;
}
#player {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #fff;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.primary {
  flex: 1 1 200px;
  border-radius: 6px;
  font-weight: 700;
}
.ghost {
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.fine {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--f-soft);
}

.when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 20px;
}
.when p {
  margin: 0;
}
.age strong {
  font-size: clamp(54px, 9vw, 96px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.age span {
  font-size: 20px;
  color: var(--f-soft);
}
.age strong::before {
  content: "age ";
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--f-soft);
}
.era {
  text-align: right;
}
.era strong {
  display: block;
  font-size: 22px;
}
.era span {
  color: var(--f-soft);
}
.spools {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 16px 0 0;
}
.spools div {
  min-width: 0;
}
.spools dt {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.spools dt span {
  font-variant-numeric: tabular-nums;
  color: var(--f-soft);
}
.spools dd {
  margin: 4px 0 0;
  height: 14px;
  background: var(--linen-deep);
  position: relative;
  overflow: hidden;
}
.spools dd i {
  position: absolute;
  inset: 0;
  transform-origin: left;
  background: var(--c);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.spools dd.low {
  outline: 2px solid var(--f-warn);
  outline-offset: 1px;
}
.table {
  margin-top: 26px;
}
.table h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.event-text {
  max-width: 62ch;
  margin: 8px 0 0;
  font-size: 19px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 170px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--f-surface);
  color: var(--ink);
  text-align: left;
  transition: translate 0.12s, box-shadow 0.12s;
  animation: deal 0.3s both;
}
.card:nth-child(2) {
  animation-delay: 0.05s;
}
.card:nth-child(3) {
  animation-delay: 0.1s;
}
@keyframes deal {
  from {
    opacity: 0;
    translate: 0 10px;
  }
}
.card:hover,
.card:focus-visible {
  translate: -2px -2px;
  box-shadow: 5px 5px 0 var(--ink);
}
.card b {
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.card span {
  color: var(--f-soft);
  line-height: 1.35;
}
.pulls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pull {
  padding: 1px 8px 2px;
  border-left: 5px solid var(--c);
  background: rgba(27, 33, 72, 0.07);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.pull.down {
  opacity: 0.72;
}
.card kbd {
  position: absolute;
}
.card {
  position: relative;
}
.card kbd {
  right: 10px;
  top: 10px;
}

.stone {
  margin-top: 26px;
  padding: clamp(20px, 4vw, 40px);
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--linen);
  --f-soft: rgba(231, 225, 212, 0.78);
}
.kicker {
  margin: 0 0 6px;
  color: var(--f-soft);
}
.stone h2 {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.epitaph p {
  max-width: 60ch;
  margin: 12px 0 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.4;
}
.epitaph p:first-child {
  font-weight: 700;
}
.score {
  margin: 22px 0 0;
}
.score strong {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 800;
  color: var(--weld);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.score span {
  font-size: 22px;
  margin-left: 8px;
}
.stone .primary {
  background: var(--weld);
  color: var(--ink);
}
.stone .ghost {
  border-color: var(--linen);
  color: var(--linen);
}
.stone .status {
  color: var(--f-soft);
}

.story {
  margin-top: 34px;
}
.story h2 {
  font-size: 24px;
  margin-bottom: 10px;
}
.story ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 70ch;
}
.story li {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--f-line);
}
.story li > span:first-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--f-soft);
}
.story li.era {
  text-align: left;
  color: var(--indigo);
  font-weight: 600;
}
.story li b {
  font-weight: 700;
}
.credit {
  margin: 40px 0 0;
  font-size: 13.5px;
  color: var(--f-soft);
}
.credit a {
  color: inherit;
}
dialog {
  background: var(--f-surface);
  border: 2px solid var(--ink);
  border-radius: 8px;
}
dialog::backdrop {
  background: rgba(27, 33, 72, 0.55);
}
.tabs {
  background: rgba(27, 33, 72, 0.08);
}
.help p {
  margin: 0 0 12px;
  color: var(--f-soft);
}
@media (max-width: 820px) {
  .start {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }
  #begin {
    grid-column: 1;
    grid-row: auto;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 0;
  }
  .card kbd {
    display: none;
  }
  .spools {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .spools dt span {
    display: none;
  }
  .spools dt {
    font-size: 12.5px;
  }
  .key.note,
  .crumb {
    display: none;
  }
  .era {
    text-align: left;
  }
}
