/* Scripture Studio — styled with the MyBibleLens brand palette
   (parchment #fdf8f3, gold #b6741d, Hammersmith One / Inter / Lora). */
@import url('https://fonts.googleapis.com/css2?family=Hammersmith+One&family=Inter:ital,wght@0,400;0,600;0,700;1,400&family=Lora:ital@0;1&display=swap');

:root {
  --gold: #b6741d;
  --gold-deep: #8f5916;
  --ink: #1a1a1a;
  --cream: #fdf8f3;
  --parchment: #f7ede2;
  --line: #e8d9c4;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: "Inter", "Avenir Next", sans-serif;
  background: var(--cream);
  color: var(--ink);
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff8f3;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark { color: var(--gold); font-size: 20px; }
.brand-name { font-family: "Hammersmith One", sans-serif; font-weight: 400; font-size: 18px; letter-spacing: -0.2px; }
.brand-sub { font-size: 11px; color: #9a8a70; }
.powered { font-size: 11px; color: #6b5a44; }
.powered b { color: var(--gold-deep); }

.studio {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
  padding: 18px 22px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 860px) { .studio { grid-template-columns: 1fr; } }

/* ---- chat ---- */
.chat-panel {
  display: flex; flex-direction: column; min-height: 0;
  background: #fff8f3;
  border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden;
}
.thread {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.msg.assistant {
  background: var(--parchment); border: 1px solid var(--line);
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.msg.user {
  background: var(--gold); color: #fff;
  border-bottom-right-radius: 4px; align-self: flex-end;
}
.msg.thinking { color: #9a8a70; font-style: italic; }
.msg .ref-pill {
  display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700;
  color: var(--gold-deep); background: #fff8f3; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px; letter-spacing: 0.05em;
}

.starters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff8f3; cursor: pointer;
}
.chip:hover { border-color: var(--gold); }

.composer {
  flex: 0 0 auto; display: flex; gap: 8px; align-items: flex-end;
  padding: 10px; border-top: 1px solid var(--line); background: #fff8f3;
}
.composer select {
  font: inherit; font-size: 11.5px; padding: 8px 4px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff8f3; color: #6b5a44;
}
.composer textarea {
  flex: 1; padding: 10px 12px; font: inherit; font-size: 13.5px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  resize: none; max-height: 110px;
}
.composer textarea:focus { outline: none; border-color: var(--gold); }
.send {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: var(--gold); color: #fff; font-size: 18px; cursor: pointer;
}
.send:hover { background: #8f5916; }
.send:disabled { opacity: 0.5; cursor: wait; }

/* ---- canvas ---- */
.canvas-wrap { display: flex; flex-direction: column; min-height: 0; }
.canvas {
  flex: 1; min-height: 0; overflow-y: auto;
  background: radial-gradient(ellipse at 30% 20%, #fff8f3 0%, var(--parchment) 70%);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 24px;
  display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; justify-content: center;
}
.canvas-empty { align-self: center; margin: auto; text-align: center; color: #b6a888; }
.canvas-empty span { font-size: 34px; color: var(--gold); }

.verse-card {
  width: 340px; background: #fff8f3;
  border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 24px 16px;
  box-shadow: 0 12px 40px rgba(122, 82, 6, 0.13);
  text-align: center;
  animation: land 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes land {
  from { transform: translateY(18px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.verse-text { font-family: "Lora", Georgia, serif; font-size: 16.5px; line-height: 1.55; margin-bottom: 10px; }
.verse-ref { font-weight: 700; color: var(--gold-deep); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.card-caption { font-size: 12px; color: #6b5a44; font-style: italic; margin-bottom: 12px; }
.card-credit { font-size: 8.5px; color: #b6a888; margin-bottom: 10px; }
.card-actions { display: flex; gap: 6px; justify-content: center; }
.ghost {
  font: inherit; font-size: 11.5px; padding: 6px 12px;
  background: none; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink);
}
.ghost:hover { border-color: var(--gold); }

.foot {
  flex: 0 0 auto;
  text-align: center; font-size: 10.5px; color: #9a8a70;
  padding: 10px; border-top: 1px solid var(--line);
}
