/* writing + entries: the form sits on a parchment panel over the field */

body { background: #0c0701; }
canvas#plate { touch-action: pan-y; cursor: default; }

main {
  position: relative;
  z-index: 5;
  padding: 64px 16px 48px;
}
.panel.generator,
.panel.entries-panel {
  width: min(440px, 100%);
}
.panel.entries-panel { width: min(560px, 100%); }
@media (min-width: 821px) {
  main { padding-left: 28px; }
}
@media (max-width: 820px) {
  /* leave the tablets visible above the form on small screens */
  main { padding-top: 50vh; }
  .panel.generator, .panel.entries-panel { background: rgba(12, 7, 1, 0.95); }
  .panel.generator, .panel.entries-panel { margin: 0 auto; }
}

.panel .kicker { margin-bottom: 2px; }
.subtitle, .entries-subtitle {
  margin: 6px 0 8px;
  font: 13px "Courier New", Courier, monospace;
  color: #b9a774;
}

.count-options { display: flex; gap: 6px; margin-bottom: 10px; }
.count-option { min-width: 40px; }
.count-option.is-selected { border-style: inset; background: #6a2a08; color: #fff1a3; }
.go-button { margin-bottom: 12px; letter-spacing: 0.1em; }

.selected-section h2 { font-size: 15px; margin-bottom: 6px; }
.word-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 26px; margin-bottom: 12px; }
.word-pill {
  padding: 1px 7px;
  border: 1px solid #6a4a1c;
  background: #1a0f06;
  font: 14px "Courier New", Courier, monospace;
  color: #c9a35a;
}
.word-pill.is-used {
  border-color: #e0b643;
  background: #6a2a08;
  color: #fff1a3;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 241, 163, 0.5);
}

.name-field { display: block; margin-bottom: 8px; }
.name-field span {
  display: block;
  margin-bottom: 2px;
  font: 13px "Courier New", Courier, monospace;
  color: #b9a774;
}
.name-field input, #writing-box {
  box-sizing: border-box;
  width: 100%;
  padding: 4px 6px;
}
#writing-box {
  min-height: 190px;
  resize: vertical;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.4;
}
.word-counter { margin: 4px 0 8px; font: 13px "Courier New", Courier, monospace; color: #8a6a35; }
.submit-button { display: block; width: 100%; margin-bottom: 8px; padding: 6px; letter-spacing: 0.08em; }
.entries-link, .new-entry-link { font: 14px "Courier New", Courier, monospace; }
.status { min-height: 1em; margin: 6px 0 0; font: 13px "Courier New", Courier, monospace; color: #e14925; }

/* entries */
.entry-shell { display: grid; grid-template-columns: 170px 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 520px) { .entry-shell { grid-template-columns: 1fr; } }
.entry-list-panel h2 { font-size: 15px; margin-bottom: 6px; }
.entry-list { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; }
.entry-button {
  text-align: left;
  padding: 3px 6px !important;
  font-size: 13px !important;
}
.entry-button strong { display: block; color: #f4cf68; }
.entry-button span { display: block; font-size: 11px; color: #8a6a35; }
.entry-button.is-active { border-style: inset !important; background: #6a2a08 !important; }
.entry-detail h2 { font-size: 22px; }
.entry-meta { margin: 2px 0 8px; font: 12px "Courier New", Courier, monospace; color: #8a6a35; }
.entry-words { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.entry-words span {
  padding: 0 6px;
  border: 1px solid #6a4a1c;
  font: 12px "Courier New", Courier, monospace;
  color: #c9a35a;
}
.entry-text { white-space: pre-wrap; font-size: 17px; line-height: 1.45; }
.empty-state { font: 13px "Courier New", Courier, monospace; color: #8a6a35; }
