:root {
  --paper: #efe3c9;
  --paper-bright: #f8efdb;
  --paper-deep: #cfb78e;
  --ink: #241c15;
  --ink-soft: #463a2d;
  --olive: #625a46;
  --oxblood: #76201f;
  --amber: #c98b2e;
  --night: #101720;
  --frame: #1c1814;
  --cream: #f2e7cc;
  --rule: rgba(36, 28, 21, 0.32);
  --rule-soft: rgba(36, 28, 21, 0.15);
  --rule-strong: rgba(36, 29, 23, 0.66);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --numeric: "Courier Prime", "Courier New", monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  background:
    radial-gradient(72% 52% at 61% 38%, rgba(255, 251, 238, 0.38), rgba(255, 251, 238, 0) 62%),
    radial-gradient(125% 105% at 45% 15%, var(--paper-bright) 0%, #f3e7ce 29%, #ebdbba 58%, #dfcaa4 80%, var(--paper-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.page-frame {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  border: 14px solid var(--frame);
  box-shadow: inset 0 0 0 1px rgba(242, 231, 204, 0.2);
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
}

.num {
  font-family: var(--numeric);
  font-variant-numeric: tabular-nums;
}

.label,
.field-label {
  font-family: var(--text);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--olive);
}

.masthead {
  background: var(--night);
  color: var(--cream);
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 15px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 21px 40px 19px;
}

.mark {
  width: 26px;
  height: 36px;
  flex: none;
}

.wordmark-block {
  position: relative;
  top: -1px;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--cream);
}

.subtitle {
  margin: 8px 0 0 2px;
  font-family: var(--text);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.27em;
  line-height: 1.2;
  text-transform: uppercase;
  color: rgba(242, 231, 204, 0.64);
}

.page {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr);
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px 100px;
}

.ledger {
  padding: 34px 24px 60px 0;
  border-right: 1px solid var(--rule);
}

.clock {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.clock-cell {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.clock-cell .num {
  font-size: 13px;
  line-height: 1.2;
}

.tally {
  margin: 24px 0 26px;
  padding: 17px 0 15px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.tally-num {
  font-size: 46px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--amber);
}

.tally-label {
  margin-top: 8px;
  font-family: var(--text);
  font-size: 8px;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--olive);
}

.attrs {
  display: flex;
  flex-direction: column;
}

.attr-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}

.attr-name {
  font-family: var(--text);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink);
}

.attr-val {
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
}

.vitals {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}

.vital {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vital-label {
  font-family: var(--text);
  font-size: 8px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--olive);
}

.vital-val {
  font-size: 11.5px;
  line-height: 1;
  color: var(--ink-soft);
}

.ledger-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
}

.ledger-foot .label {
  font-size: 8px;
}

.ledger-foot .num {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--olive);
}

.main {
  min-width: 0;
  max-width: 900px;
  padding: 36px 0 0 46px;
}

.plate {
  margin: 0 0 40px;
}

.plate-art {
  border: 1px solid var(--rule);
  overflow: hidden;
}

.plate-svg {
  display: block;
  width: 100%;
  height: auto;
}

.plate-svg .spill {
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
}

.plate-svg .hair {
  fill: none;
  stroke: rgba(36, 28, 21, 0.46);
  stroke-width: 1;
  stroke-linecap: round;
}

.plate-svg .ground {
  fill: none;
  stroke: rgba(36, 28, 21, 0.62);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.plate-svg .frame {
  fill: none;
  stroke: rgba(36, 28, 21, 0.78);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plate-svg .ink {
  fill: var(--ink);
}

.plate-svg .flame {
  fill: var(--amber);
}

.plate-svg .core {
  fill: #f8e9c4;
}

.plate figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: var(--text);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
}

.section-head {
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--ink);
}

.section-note {
  max-width: 560px;
  margin: 7px 0 0;
  font-family: var(--text);
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(36, 28, 21, 0.7);
}

.era-block {
  margin: 30px 0 28px;
}

.era-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
}

.era-option {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--text);
  text-align: left;
  cursor: pointer;
}

.era-option .era-name {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.era-option .era-year {
  font-size: 12px;
  color: var(--olive);
}

.era-option:hover {
  border-color: var(--rule-strong);
}

.era-option[aria-pressed="true"] {
  border-color: var(--ink);
}

.era-option[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 4px;
  background: var(--amber);
}

.era-option:focus-visible {
  outline: 1px solid var(--oxblood);
  outline-offset: 3px;
}

.fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 92px 120px;
  gap: 0 26px;
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 10px;
  border-bottom: 1px solid var(--rule-strong);
}

.field-name {
  grid-column: 1;
}

.field-age {
  grid-column: 2;
}

.field-year {
  grid-column: 3;
}

.field-origin {
  grid-column: 1 / -1;
  margin-top: 14px;
}

.field:focus-within {
  border-bottom-color: var(--ink);
}

.field-input {
  width: 100%;
  margin: 0;
  padding: 0 0 8px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.3;
}

.field-input.num {
  font-family: var(--numeric);
  font-size: 17px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.attr-editor {
  margin-top: 36px;
}

.editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-soft);
}

.editor-meta {
  display: flex;
  align-items: baseline;
  gap: 20px;
  justify-content: flex-end;
}

.editor-note {
  margin: 0;
  font-family: var(--text);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.35;
  color: rgba(36, 28, 21, 0.66);
  text-align: right;
}

.editor-points {
  flex: none;
  margin: 0;
  font-family: var(--text);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--olive);
  white-space: nowrap;
}

.editor-points .num {
  margin-right: 4px;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--amber);
}

.editor-rows {
  margin-top: 6px;
}

.attr-edit {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 18px 28px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.attr-edit-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.attr-edit-name .attr-name {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink);
}

.attr-gloss {
  font-family: var(--text);
  font-style: italic;
  font-size: 14px;
  line-height: 1.25;
  color: rgba(36, 28, 21, 0.62);
}

.squares {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
  max-width: 300px;
}

.sq {
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.sq[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber);
}

.sq:hover {
  border-color: var(--ink);
}

.sq[aria-pressed="true"]:hover {
  border-color: var(--amber);
}

.sq:focus-visible {
  outline: 1px solid var(--oxblood);
  outline-offset: 2px;
}

.start-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.start-note {
  margin: 0;
  font-family: var(--text);
  font-style: italic;
  font-size: 14px;
  line-height: 1.35;
  color: var(--olive);
}

.stamp-button {
  padding: 12px 20px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.stamp-button:hover {
  background: rgba(36, 28, 21, 0.06);
}

.stamp-button:active {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(1px);
}

.stamp-button:disabled {
  border-color: var(--rule);
  color: var(--olive);
  background: transparent;
  cursor: not-allowed;
  transform: none;
}

.stamp-button:focus-visible {
  outline: 1px solid var(--oxblood);
  outline-offset: 3px;
}

.link-button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--olive);
  font-family: var(--text);
  font-size: 9px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
  cursor: pointer;
}

.link-button:hover {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

.link-button:focus-visible {
  outline: 1px solid var(--oxblood);
  outline-offset: 3px;
}

.scene {
  margin: 0 0 40px;
}

.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--text);
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--olive);
}

.scene-meta .num {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.scene-text {
  max-width: 620px;
  margin: 20px 0 0;
  font-family: var(--text);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(36, 28, 21, 0.82);
}

.chronicle {
  max-width: 720px;
}

.empty-chronicle {
  margin: 0;
  padding: 48px 10px 44px;
  font-family: var(--text);
  font-size: 10px;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: center;
  color: var(--olive);
}

.entry {
  margin: 0 0 46px;
}

.written {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule);
}

.written-label {
  flex: none;
  font-family: var(--text);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--olive);
}

.written-text {
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.check {
  margin: 0 0 28px 6px;
  padding: 2px 0 2px 22px;
  border-left: 1px solid var(--rule);
}

.check-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.check-label {
  font-family: var(--text);
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink);
}

.check-label .num {
  margin-left: 3px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.check-chance .num {
  margin-left: 4px;
  font-size: 14px;
  letter-spacing: 0;
}

.check-roll {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 106px;
  height: 106px;
  margin: 20px auto 16px;
}

.roll-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.roll-ring path {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.roll-ring.is-success path {
  stroke: var(--amber);
}

.roll-ring.is-failure path {
  stroke: var(--oxblood);
}

.roll-num {
  position: relative;
  font-size: 35px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.stamp-wrap {
  display: flex;
  justify-content: center;
  margin: 2px 0 24px;
}

.stamp {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 9px 26px 8px;
  border: 1.5px solid currentColor;
  font-family: var(--display);
  font-size: clamp(20px, 4.6vw, 28px);
  font-weight: 900;
  letter-spacing: 0.26em;
  line-height: 1;
  text-indent: 0.26em;
  white-space: nowrap;
  transform: rotate(-2.4deg);
  animation: stamp-press 210ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.stamp::before {
  content: attr(data-word);
  position: absolute;
  inset: -1.5px;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
  opacity: 0.16;
  transform: translate(3px, 3px) rotate(0.7deg);
  letter-spacing: 0.26em;
  text-indent: 0.26em;
}

.stamp.is-success {
  color: var(--oxblood);
}

.stamp.is-failure {
  border-width: 2px;
  color: var(--night);
}

.stamp.is-failure::before {
  border-width: 2px;
}

@keyframes stamp-press {
  0% {
    transform: translateY(-24px) rotate(-5.6deg) scale(1.05);
  }
  55% {
    transform: translateY(1px) rotate(-1.9deg) scale(0.995);
  }
  78% {
    transform: translateY(0) rotate(-2.8deg) scale(1.004);
  }
  100% {
    transform: rotate(-2.4deg) scale(1);
  }
}

.narration {
  max-width: 620px;
}

.narration p {
  margin: 0 0 14px;
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
}

.narration .dropcap::first-letter {
  float: left;
  padding: 0.04em 0.04em 0 0;
  font-family: var(--display);
  font-size: 3.3em;
  font-weight: 900;
  line-height: 0.8;
  color: var(--oxblood);
}

.effects {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
}

.effect {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--text);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--olive);
}

.effect .num {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.action {
  max-width: 720px;
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px 18px;
}

.action-label {
  padding-bottom: 10px;
  font-family: var(--text);
  font-size: 10px;
  letter-spacing: 0.22em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ink);
}

.action-line {
  position: relative;
  min-width: 0;
  border-bottom: 1px solid var(--ink);
}

.action-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 3px 2px 9px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.35;
  caret-color: transparent;
}

.nib {
  position: absolute;
  bottom: 9px;
  left: 2px;
  width: 1px;
  height: 1.25em;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}

.action-line:focus-within .nib {
  opacity: 1;
  animation: nib-blink 1.9s steps(1, end) infinite;
}

@keyframes nib-blink {
  0%,
  54% {
    opacity: 1;
  }
  55%,
  100% {
    opacity: 0;
  }
}

.nib-mirror {
  position: absolute;
  top: -9999px;
  left: -9999px;
  white-space: pre;
  visibility: hidden;
  pointer-events: none;
}

.action-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-top: 12px;
}

.action-hint {
  margin: 0;
  font-family: var(--text);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--olive);
}

.closing {
  max-width: 620px;
  margin: 8px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.closing[hidden] {
  display: none;
}

.closing-rule {
  margin: 0;
  text-align: center;
  font-family: var(--text);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--olive);
}

.closing-text {
  margin: 16px 0 26px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 172px minmax(0, 1fr);
    padding: 0 28px 90px;
  }

  .ledger {
    padding-right: 18px;
  }

  .main {
    padding-left: 34px;
  }
}

@media (max-width: 820px) {
  .page {
    display: block;
    padding: 0 20px 72px;
  }

  .ledger {
    padding: 18px 0 17px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .main {
    max-width: none;
    padding: 28px 0 0;
  }

  .clock {
    flex-direction: row;
    gap: 28px;
  }

  .clock-cell {
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
  }

  .tally {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
    text-align: left;
  }

  .tally-num {
    font-size: 30px;
  }

  .tally-label {
    margin-top: 0;
  }

  .attrs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .attr-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 0;
  }

  .attr-name {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .attr-val {
    font-size: 14px;
  }

  .vitals {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px 18px;
    margin-top: 14px;
    padding-top: 12px;
  }

  .ledger-foot {
    display: none;
  }

  .page-frame {
    border-width: 10px;
  }

  .masthead-inner {
    padding: 16px 22px 14px;
    gap: 12px;
  }

  .mark {
    width: 22px;
    height: 30px;
  }

  .wordmark {
    font-size: 23px;
    letter-spacing: 0.28em;
  }

  .subtitle {
    margin-top: 6px;
    font-size: 7.5px;
    letter-spacing: 0.2em;
  }

  .plate {
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 24px;
  }

  .era-options {
    grid-template-columns: 1fr;
  }

  .editor-head {
    display: block;
  }

  .editor-meta {
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
  }

  .editor-note {
    text-align: left;
  }

  .attr-edit {
    display: block;
    padding: 13px 0 14px;
  }

  .attr-edit-name {
    margin-bottom: 10px;
  }

  .squares {
    max-width: none;
    gap: 6px;
  }

  .action-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .action-row .stamp-button {
    grid-column: 2;
    justify-self: end;
    margin-top: 12px;
  }

  .check {
    margin-left: 0;
    padding-left: 16px;
  }

  .check-roll {
    width: 94px;
    height: 94px;
    margin: 17px auto 14px;
  }

  .roll-num {
    font-size: 31px;
  }

  .narration p,
  .scene-text,
  .written-text,
  .action-input {
    font-size: 18px;
  }

  .empty-chronicle {
    padding: 40px 4px 38px;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 0 16px 64px;
  }

  .fields {
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  .field-name {
    grid-column: 1 / -1;
  }

  .field-age {
    grid-column: 1;
  }

  .field-year {
    grid-column: 2;
  }

  .field-origin {
    grid-column: 1 / -1;
  }

  .written {
    gap: 10px;
  }

  .check-head {
    gap: 12px;
  }

  .check-label {
    font-size: 8.5px;
    letter-spacing: 0.14em;
  }

  .check-chance .num {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stamp {
    animation: none;
  }

  .action-line:focus-within .nib {
    animation: none;
  }
}
