:root {
  color: #1b140f;
  background: #efe6d6;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }

body { margin: 0; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: #7a2e24; }

#app { min-height: 100vh; }

.shell { max-width: 1040px; margin: 0 auto; padding: 28px 20px 80px; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 28px;
}

.brand { display: flex; gap: 12px; align-items: center; }

.mark {
  width: 18px;
  height: 18px;
  background: #9d2c2c;
}

h1, h2, h3 { font-family: Palatino, "Iowan Old Style", Georgia, serif; font-weight: 500; margin: 0; }

h1 { font-size: 40px; letter-spacing: -0.03em; }

.sub { margin: 4px 0 0; color: #6d6258; }

nav { display: flex; gap: 8px; flex-wrap: wrap; }

nav a, .ghost, .solid {
  border: 1px solid #1b140f;
  background: transparent;
  padding: 8px 12px;
  text-decoration: none;
  color: #1b140f;
}

.solid, nav a.current { background: #1b140f; color: #f6f0e4; }

.ghost.danger { border-color: #9d2c2c; color: #9d2c2c; }

.card, .song, .take, .queue-item, .login {
  background: #fffaf2;
  border: 1px solid #e2d5c3;
}

.login {
  max-width: 420px;
  margin: 12vh auto;
  padding: 28px;
}

.login p { color: #6d6258; }

label { display: block; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; margin: 16px 0 6px; }

select:disabled { opacity: 0.55; }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  border: 1px solid #cbbba6;
  background: #fff;
  padding: 10px 12px;
}

textarea { min-height: 160px; resize: vertical; }

textarea.lyrics, textarea.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 14px; line-height: 1.5; }

textarea.lyrics { min-height: 360px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.row > * { flex: 1; }

.row .tight { flex: 0 0 auto; }

.counts { display: flex; gap: 16px; color: #6d6258; font-size: 13px; margin-top: 6px; }

.counts .over { color: #9d2c2c; }

.error {
  background: #f8e4df;
  border: 1px solid #9d2c2c;
  padding: 10px 12px;
  margin: 12px 0;
}

.warn {
  background: #f8ecd4;
  border: 1px solid #8a5a12;
  padding: 12px 14px;
  margin: 12px 0;
}

label.confirm {
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

label.confirm input { width: auto; margin-top: 4px; }

.voice-id {
  font-family: ui-monospace, Menlo, monospace;
  background: #f6f0e4;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.ok { color: #1f6b45; font-size: 14px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

.filters button { background: transparent; border: 1px solid #cbbba6; padding: 6px 10px; }

.filters button.on { border-color: #1b140f; background: #1b140f; color: #f6f0e4; }

.group { margin-top: 22px; }

.group h2 { font-size: 22px; margin-bottom: 8px; }

.song {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}

.song:hover { border-color: #1b140f; }

.num { font-family: Palatino, Georgia, serif; font-size: 22px; color: #9d2c2c; }

.song small, .muted { color: #6d6258; }

.stamp {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 3px 7px;
}

.stamp.draft { color: #6d6258; }
.stamp.generating { color: #8a5a12; }
.stamp.review { color: #1d4e89; }
.stamp.queued, .stamp.published { color: #1f6b45; }

.editor-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin: 8px 0 18px; }

.back { display: inline-block; margin-bottom: 8px; }

.take, .queue-item { padding: 14px; margin-top: 12px; }

.take audio, .queue-item audio { width: 100%; margin: 10px 0; }

.cover-preview {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border: 1px solid #e2d5c3;
  background: #fffaf2;
  display: block;
}

.logo-preview {
  max-width: 360px;
  max-height: 140px;
  object-fit: contain;
  border: 1px solid #e2d5c3;
  background: #fffaf2;
  display: block;
}

.sheet {
  white-space: pre-wrap;
  font-family: ui-monospace, Menlo, monospace;
  background: #f6f0e4;
  padding: 12px;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

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

.label-row label { flex: 1; }

.tight-buttons { display: flex; gap: 8px; }

.ghost.tiny { padding: 2px 8px; font-size: 13px; }

.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid #1b140f;
  background: #fffaf2;
  color: inherit;
}

.modal::backdrop { background: rgba(27, 20, 15, 0.45); }

.modal-body { padding: 20px 22px 22px; }

.modal .over { color: #9d2c2c; }

.modal-prompt {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 60vh;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  background: #f6f0e4;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
}

.modal mark { background: #f8e4df; color: #9d2c2c; }

textarea.idea { min-height: 220px; }

.corpus {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px;
  line-height: 1.5;
  background: #fffaf2;
  border: 1px solid #e2d5c3;
  padding: 16px;
  margin: 12px 0 0;
}

.corpus mark { background: #f3d48a; color: inherit; }

.find input { width: auto; min-width: 12rem; }

details { margin-top: 22px; }

details summary { cursor: pointer; font-family: Palatino, Georgia, serif; font-size: 22px; }

@media (max-width: 700px) {
  h1 { font-size: 32px; }
  .top, .editor-head, .song { display: block; }
  .song .stamp { display: inline-block; margin-top: 8px; }
  .shell { padding: 18px 14px 64px; }
}
