@font-face {
  font-family: Chronicle;
  src: url("assets/CormorantGaramond-400-0.ttf");
}
@font-face {
  font-family: Chronicle;
  src: url("assets/CormorantGaramond-700-0.ttf");
  font-weight: 700;
}
@font-face {
  font-family: DM;
  src: url("assets/DMSans-400-0.ttf");
}
@font-face {
  font-family: DM;
  src: url("assets/DMSans-700-0.ttf");
  font-weight: 700;
}
:root {
  --sans: DM, Arial, sans-serif;
  --serif: Chronicle, Georgia, serif;
  --paper: #fff3db;
  --ink: #142a21;
  --ct-fill: #fff9ee;
  --ct-sub: #465c50;
  --line: #a8b59c;
  --wine: #a41c35;
  --pine: #114737;
  --ct-on-action: #fffdf7;
  --ct-on-secondary: #fffdf7;
  --ct-mast-ink: #fff3db;
  --ct-mast-muted: #e5ddc8;
  --ct-mast-rule: #56705a;
  --ct-stroke: #718476;
  --ct-accent-ink: #a41c35;
  --gold: #a47a34;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background: #062b21;
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
label.upload {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
input,
textarea,
select {
  min-width: 0;
  border: 1px solid var(--ct-stroke);
  background: var(--ct-fill);
  color: var(--ink);
  border-radius: 4px;
  width: 100%;
  padding: 10px 11px;
}
textarea {
  resize: vertical;
  min-height: 85px;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--wine);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--wine);
  flex: 0 0 18px;
}
input[type="number"] {
  appearance: textfield;
}
select {
  appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 52%,
    calc(100% - 11px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
a {
  color: inherit;
}
button,
.major,
.minor {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 43px;
  border-radius: 3px;
  padding: 10px 15px;
}
.major {
  border: 1px solid var(--wine);
  background: var(--wine);
  color: var(--ct-on-action);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.minor {
  border: 1px solid var(--ct-stroke);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.minor:hover {
  background: var(--ct-selection);
}
.plain {
  border: 0;
  background: transparent;
  color: var(--ct-accent-ink);
  text-decoration: underline;
  padding: 8px 0;
}
.full {
  width: 100%;
}
[hidden] {
  display: none !important;
}
.mast {
  width: min(1450px, calc(100% - 64px));
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--ct-mast-rule);
  color: var(--ct-mast-ink);
  gap: 20px;
}
.brand {
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  white-space: nowrap;
}
.brand b {
  color: var(--gold);
  font-size: 20px;
}
.brand span {
  font: 400 12px var(--sans);
  letter-spacing: 0.12em;
  border-left: 1px solid var(--ct-mast-rule);
  margin-left: 18px;
  padding-left: 18px;
}
.langs {
  display: flex;
  gap: 3px;
}
.langs button {
  padding: 6px;
  min-height: 34px;
  font-size: 13px;
  color: var(--ct-mast-muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
}
.langs button[aria-pressed="true"] {
  color: var(--ct-mast-ink);
  border-color: var(--gold);
}
.intro {
  width: min(1450px, calc(100% - 64px));
  margin: 40px auto 28px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  color: var(--ct-mast-ink);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin: 0 0 12px;
}
.intro h1 {
  font: 400 clamp(34px, 4.4vw, 64px) / 0.98 var(--serif);
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}
.lede {
  max-width: 610px;
  font-size: 16px;
  color: var(--ct-mast-muted);
  margin: 0;
}
.intro-right {
  border-left: 1px solid var(--ct-mast-rule);
  padding-left: 35px;
  min-width: 250px;
  align-self: center;
}
.issue-year {
  font: 400 90px/0.9 var(--serif);
  letter-spacing: -0.05em;
}
.intro-right p {
  font-size: 14px;
  color: var(--ct-mast-muted);
  margin-bottom: 0;
}
.edition-note {
  width: min(1450px, calc(100% - 64px));
  margin: 0 auto 20px;
  padding: 10px 16px;
  border: 1px solid var(--ct-mast-rule);
  color: var(--ct-mast-muted);
  font-size: 14px;
  background: #00000012;
}
.workspace {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 30px;
  width: min(1450px, calc(100% - 64px));
  margin: 0 auto;
}
.paper {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.editor {
  padding: 20px;
  height: max-content;
}
.editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 2px solid var(--wine);
  padding-bottom: 15px;
  margin-bottom: 8px;
}
.editor-title h2 {
  font: 700 30px/1 var(--serif);
  margin: 0;
}
#save-state {
  font-size: 12px;
  color: var(--ct-sub);
  text-align: right;
}
details {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
details:last-child {
  border: 0;
  padding-bottom: 0;
}
summary {
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style-position: outside;
  margin-left: 16px;
  padding: 2px 0 2px 3px;
}
.fields {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.field-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
}
.upload {
  position: relative;
  cursor: pointer;
  display: flex;
  border: 1px dashed var(--ct-stroke);
  padding: 12px;
  align-items: center;
  text-align: center;
  border-radius: 4px;
  background: var(--ct-fill);
}
.upload input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  padding: 0;
}
.upload:focus-within {
  outline: 3px solid var(--ct-accent-ink);
  outline-offset: 2px;
}
.field-hint,
.film-hint {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ct-sub);
  margin: 10px 0 14px;
}
.count {
  font-size: 12px;
  font-weight: 400;
  float: right;
}
.memory {
  margin: 11px 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 11px;
  background: var(--ct-fill);
}
.memory summary {
  font-size: 14px;
  display: list-item;
  margin-left: 13px;
  padding: 1px 0;
}
.memory[open] {
  border-color: var(--ct-stroke);
}
.memory .fields {
  gap: 11px;
}
.memory-thumb {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.memory-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.memory-actions button {
  min-width: 37px;
  padding: 6px;
  min-height: 34px;
}
.memory-actions .remove {
  margin-left: auto;
}
.small-button {
  background: transparent;
  color: var(--ct-sub);
  border: 1px solid var(--line);
}
.film-check {
  flex-direction: row;
  align-items: center;
  font-size: 13px;
  gap: 7px;
}
.preview-area {
  min-width: 0;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--ct-mast-ink);
  gap: 10px;
}
.view-tabs {
  display: flex;
  border: 1px solid var(--ct-mast-rule);
  border-radius: 3px;
  padding: 3px;
}
.view-tabs button {
  background: transparent;
  color: var(--ct-mast-muted);
  border: 0;
  padding: 10px 16px;
  min-height: 40px;
}
.view-tabs button[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
}
.preview-caption {
  font-size: 11px;
  letter-spacing: 0.14em;
}
.sheet-stack {
  display: grid;
  gap: 28px;
  justify-items: center;
}
.sheet-stack canvas {
  display: block;
  width: 100%;
  max-width: 840px;
  height: auto;
  box-shadow: 0 20px 50px #0004;
  border: 1px solid #0002;
  background: var(--paper);
}
.page-total {
  text-align: center;
  color: var(--ct-mast-muted);
  font-size: 13px;
  margin: 16px 0 24px;
}
.film-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--ct-mast-rule);
  border-radius: 4px;
  margin-bottom: 24px;
  background: #00000018;
}
.film-preview canvas {
  width: min(100%, 360px);
  height: auto;
  box-shadow: 0 20px 50px #0004;
  background: var(--paper);
}
.play-film {
  color: var(--ct-mast-ink);
  border: 1px solid var(--ct-mast-rule);
  background: transparent;
  margin-top: 20px;
}
.film-hint {
  color: var(--ct-mast-muted);
  text-align: center;
  max-width: 460px;
}
.music-toggle {
  color: var(--ct-mast-ink);
  font-size: 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
}
.export-bar {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}
.export-bar strong {
  font: 700 25px/1.1 var(--serif);
}
.export-bar p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--ct-sub);
}
.export-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.size-control {
  width: 112px;
}
.size-control select {
  height: 43px;
  font-size: 14px;
}
.film-action {
  background: var(--pine) !important;
  border-color: var(--pine) !important;
  color: var(--ct-on-secondary) !important;
}
.progress-section {
  padding: 15px 20px;
  margin-top: 14px;
}
.progress-section p {
  margin: 0 0 10px;
}
.progress-section progress {
  width: 100%;
  accent-color: var(--wine);
  height: 14px;
}
.download-ready {
  padding: 18px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.download-ready p {
  font-size: 14px;
  margin: 0;
}
.status {
  font-size: 14px;
  color: var(--ct-mast-ink);
  min-height: 1.5em;
}
.button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.contribution-card {
  border: 1px solid var(--line);
  padding: 12px;
  margin-top: 10px;
  border-radius: 3px;
}
.contribution-card img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}
.contribution-card p {
  font-size: 14px;
}
.site-footer {
  width: min(1450px, calc(100% - 64px));
  margin: 40px auto 0;
  padding: 24px 0 30px;
  border-top: 1px solid var(--ct-mast-rule);
  color: var(--ct-mast-muted);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.site-footer span {
  font-family: var(--serif);
  font-size: 22px;
  white-space: nowrap;
}
.site-footer p {
  font-size: 13px;
  max-width: 620px;
  margin: 0;
}
.site-footer a {
  font-size: 12px;
}
.contributor {
  width: min(560px, calc(100% - 32px));
  margin: 40px auto;
  padding: 30px;
}
.contributor h1 {
  font: 700 44px/1 var(--serif);
  margin: 10px 0 20px;
}
.contributor form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.contributor img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  max-width: min(500px, calc(100% - 30px));
  padding: 25px;
  border-radius: 4px;
}
dialog::backdrop {
  background: #0009;
}
dialog h2 {
  font: 700 34px var(--serif);
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ct-theme-trigger {
  font-size: 14px;
}
.ct-theme-hint,
.ct-palette-name {
  font-size: 14px;
}
.ct-palette-name {
  min-height: 44px;
}
.ct-palette-art {
  height: 48px;
}
.ct-theme-head h2 {
  font-size: 35px;
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 390px minmax(0, 1fr);
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
  }
  .mast,
  .intro,
  .edition-note,
  .workspace,
  .site-footer {
    width: calc(100% - 36px);
  }
  .brand span {
    display: none;
  }
  .intro {
    margin-top: 28px;
  }
  .intro-right {
    min-width: 190px;
    padding-left: 22px;
  }
  .issue-year {
    font-size: 74px;
  }
  .editor {
    padding: 15px;
  }
  .export-bar {
    padding: 16px;
  }
  .preview-caption {
    display: none;
  }
}
@media (max-width: 760px) {
  .mast {
    padding: 14px 0;
    gap: 8px;
  }
  .brand {
    font-size: 22px;
  }
  .ct-mast-tools {
    gap: 5px;
  }
  .langs button {
    font-size: 12px;
    padding: 5px;
  }
  .ct-theme-trigger {
    font-size: 13px;
  }
  .intro {
    margin: 26px auto 22px;
    gap: 18px;
  }
  .intro h1 {
    font-size: 43px;
    max-width: 490px;
  }
  .intro-right {
    display: none;
  }
  .lede {
    font-size: 15px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .editor {
    order: 2;
  }
  .preview-area {
    order: 1;
  }
  .sheet-stack canvas {
    max-width: 550px;
  }
  .sheet-stack canvas:not(:first-child) {
    display: none;
  }
  .sheet-stack.show-all canvas {
    display: block;
  }
  .page-total button {
    font-size: 13px;
    color: var(--ct-mast-ink);
    background: transparent;
    border: 1px solid var(--ct-mast-rule);
    padding: 8px;
    min-height: 34px;
    margin-left: 10px;
  }
  .export-controls {
    width: 100%;
  }
  .export-controls button {
    flex: 1 1 140px;
  }
  .export-controls .size-control {
    flex: 1 1 100px;
  }
  .view-tabs {
    width: 100%;
  }
  .view-tabs button {
    flex: 1;
  }
  .editor details:first-of-type {
    border-top: 0;
  }
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 25px;
  }
  .film-preview canvas {
    max-width: 300px;
  }
  .edition-note {
    font-size: 13px;
  }
  .download-ready {
    align-items: flex-start;
    flex-direction: column;
  }
  .ct-palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ct-palette-name {
    font-size: 13px;
  }
  .ct-colour-dialog {
    max-height: calc(100dvh - 30px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media print {
  .mast,
  .intro,
  .editor,
  .edition-note,
  .preview-toolbar,
  .export-bar,
  .site-footer,
  .status,
  .page-total {
    display: none !important;
  }
  .workspace {
    display: block;
    width: 100%;
  }
  body {
    background: white;
  }
  .sheet-stack canvas {
    box-shadow: none;
    width: 100%;
    break-after: page;
  }
}
