/* ── Dungeon Mode Poem — shared stylesheet ──────────────
   Used by: index, workshop, game pages, slides.
   Loaded AFTER haven.css (which sets base colors/bg)
   and vorple.css (which sets Computer Modern font-family).
   ──────────────────────────────────────────────────────── */

/* ── Fonts ──────────────────────────────────────────────── */

@font-face {
  font-family: "Computer Modern";
  src: url("interpreter/cmunrm-webfont.woff2") format("woff2"),
       url("interpreter/cmunrm-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Computer Modern";
  src: url("interpreter/cmunbx-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "Computer Modern";
  src: url("interpreter/cmunti-webfont.woff") format("woff");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "Basteleur";
  src: url("slides/basteleur-bold-webfont.woff2") format("woff2"),
       url("slides/basteleur-bold-webfont.woff") format("woff");
  font-weight: bold;
  font-style: normal;
}

html, body, input, textarea, select, button {
  font-family: "Computer Modern", serif;
}

/* ── Shared base ────────────────────────────────────────── */

a, a:visited { color: #369; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-weight: 400;
}

/* ── Page: index ────────────────────────────────────────── */

body:has(.index) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.index {
  max-width: 600px;
  padding: 2em;
  line-height: 1.5em;
}
.index h1 {
  font-size: 1.6em;
  margin-bottom: 0.2em;
}
.index p {
  margin-top: 0;
  color: #666;
}
.index ul {
  list-style: none;
  padding: 0;
}
.index li {
  margin: 0.75em 0;
}
.index a {
  font-size: 1.1em;
}

/* ── Page: workshop / scene generator ───────────────────── */

.workshop-page body {
  display: flex;
  justify-content: center;
  padding: 2em 1em 4em;
}
.workshop {
  max-width: 680px;
  width: 100%;
  line-height: 1.6em;
}
.workshop h1 {
  font-size: 1.6em;
  margin-bottom: 0.1em;
}
.workshop .subtitle {
  color: #666;
  margin-top: 0;
  margin-bottom: 2em;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5em;
  font-size: 0.9em;
}

/* Form elements */
.workshop label {
  display: block;
  margin-bottom: 0.3em;
  color: #555;
  font-size: 0.9em;
}
.workshop input[type="text"],
.workshop textarea,
.workshop select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c5c2b8;
  background: #f5f3ee;
  padding: 0.5em 0.6em;
  font-size: 1em;
  font-family: "Computer Modern", serif;
  border-radius: 2px;
  margin-bottom: 0.8em;
}
.workshop input[type="text"]:focus,
.workshop textarea:focus,
.workshop select:focus {
  outline: none;
  border-color: #888;
  background: #fff;
}
.workshop textarea {
  resize: vertical;
  min-height: 3.5em;
}

/* Cards */
.card {
  border: 1px solid #d0cdc4;
  padding: 1.2em 1.4em;
  margin-bottom: 1.2em;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
}
.card-label {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 0.6em;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* Checkbox rows */
.checks {
  display: flex;
  gap: 1.5em;
  margin-bottom: 0.8em;
  flex-wrap: wrap;
}
.checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: #120320;
  font-size: 0.9em;
  margin-bottom: 0;
  cursor: pointer;
}
.checks input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

/* Buttons */
.workshop button {
  background: #120320;
  color: #e4e1d6;
  border: none;
  padding: 0.6em 1.4em;
  font-size: 1em;
  font-family: "Computer Modern", serif;
  cursor: pointer;
  border-radius: 2px;
  margin-right: 0.5em;
  margin-bottom: 0.5em;
}
.workshop button:hover {
  background: #2a1540;
}
.workshop button.secondary {
  background: transparent;
  color: #120320;
  border: 1px solid #c5c2b8;
}
.workshop button.secondary:hover {
  border-color: #888;
}

/* Output */
.workshop pre {
  background: #1a1a2e;
  color: #d4d4c8;
  padding: 1.2em;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.5;
  border-radius: 3px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.button-row {
  margin-top: 0.8em;
}

/* Inline groups */
.inline-group {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}
.inline-group > div {
  flex: 1;
  min-width: 140px;
}

/* Instructor section */
.workshop details {
  margin-top: 3em;
  border-top: 1px solid #d0cdc4;
  padding-top: 1em;
}
.workshop summary {
  cursor: pointer;
  color: #888;
  font-size: 0.9em;
}
.workshop summary:hover { color: #555; }
.instructor-fields {
  margin-top: 1.2em;
}

/* Workshop responsive */
@media (max-width: 500px) {
  .workshop-page body { padding: 1em 0.5em 3em; }
  .card { padding: 1em; }
}

/* ── Utility classes ─────────────────────────────────────── */

.hint-text {
  color: #666;
  font-size: 0.9em;
}
.status-text {
  color: #888;
  font-size: 0.85em;
}
.mono-input {
  font-family: monospace;
  font-size: 0.85em;
}
.csv-area {
  min-height: 8em;
}
.purge-btn {
  color: #a44;
}

/* ── Page: slides (Reveal.js overrides) ─────────────────── */

.reveal h1 {
  font-family: "Basteleur", serif;
}

.reveal {
  font-size: 28px;
}

.reveal blockquote {
  width: 90%;
}

.reveal section img {
  max-height: 70vh;
  object-fit: contain;
}

.reveal .r-hstack {
  display: flex;
  align-items: center;
  gap: 1.5em;
}
.reveal .r-hstack img {
  max-height: 60vh;
  max-width: 40%;
  flex-shrink: 0;
}
.reveal .r-hstack .text {
  text-align: left;
  flex: 1;
}
