:root {
  --ink: #f2efe4;
  --bg: #0b1530;
  --panel: #13214a;
  --line: rgba(242, 239, 228, 0.25);
  --accent: #d8c35a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(216, 195, 90, 0.12) 1px, transparent 0) 0 0 / 7px 7px,
    var(--bg);
  font-family: Georgia, 'Times New Roman', serif;
  -webkit-tap-highlight-color: transparent;
}
header {
  padding: 28px 22px 8px;
}
h1 {
  margin: 0;
  font-weight: 400;
  font-size: 54px;
  line-height: 0.88;
  letter-spacing: 0.01em;
}
.sub {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}
main {
  padding: 8px 22px 40px;
}
.screen {
  display: none;
}
.screen.active {
  display: block;
  animation: in 0.35s ease-out;
}
@keyframes in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
h2 {
  font-weight: 400;
  font-size: 30px;
  margin: 16px 0 6px;
}
p {
  line-height: 1.45;
  opacity: 0.9;
}
input,
textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  margin: 6px 0;
}
textarea {
  font-family: 'Courier New', monospace;
  resize: vertical;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.card {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 14px;
  min-height: 96px;
}
.card.wide {
  grid-column: span 2;
  background: #000;
  border-color: var(--accent);
}
.card b {
  display: block;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 4px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: transparent;
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 13px;
  font-style: italic;
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.actions button {
  flex: 1;
  padding: 15px;
  font-size: 17px;
  border: 1px solid var(--ink);
}
.primary {
  background: var(--ink);
  color: #000;
}
.primary:disabled {
  opacity: 0.5;
}
.ghost {
  background: transparent;
}
.pad-wrap {
  position: relative;
  border: 1px solid var(--line);
}
.pad-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}
.corpse {
  background: repeating-conic-gradient(#cfcabb 0 25%, #e2ddce 0 50%) 0 0 / 20px 20px;
}
.joint {
  position: absolute;
  left: 32%;
  right: 32%;
  height: 0;
  border-top: 2px dashed #b3261e;
  pointer-events: none;
}
.joint.top {
  top: 4px;
}
.joint.bottom {
  bottom: 4px;
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
}
.swatch.on {
  border-color: var(--ink);
  outline: 2px solid #000;
}
.tools .tool {
  background: transparent;
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 14px;
}
.tools input[type='range'] {
  width: 90px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1px dashed var(--line);
  margin: 10px 0;
  overflow: hidden;
}
.upload input {
  display: none;
}
.upload img {
  width: 100%;
}
#error {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: #3a0b0b;
  border: 1px solid #b3261e;
  padding: 14px;
}
#author {
  margin-top: 20px;
}
#photo-hint {
  font-size: 48px;
  opacity: 0.5;
}
