:root {
  --ink: #2b1f17;
  --ink-soft: #635244;
  --red: #b83a28;
  --red-hover: #9c2e1f;
  --cream: #ffffff;
  --kraft: #efe7d8;
  --line: rgba(59, 42, 30, 0.08);
  --line-strong: rgba(59, 42, 30, 0.16);
  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 16px rgba(43, 31, 23, 0.05);
  --shadow-hover: 0 12px 28px rgba(43, 31, 23, 0.09);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse 90% 40% at 50% 0%, #ffffff 0%, #f7f1e6 60%, #efe7d8 100%), #efe7d8;
  background-attachment: fixed;
  line-height: 1.5;
  min-height: 100vh;
}

.community-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.community-brand img {
  display: block;
  height: 28px;
  width: auto;
}

.community-header nav {
  display: flex;
  gap: 6px;
  background: rgba(238, 231, 219, 0.5);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

.community-header nav a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all 0.2s ease;
}

.community-header nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.community-header nav a.is-active,
.community-header nav a[aria-current="page"] {
  color: var(--red);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(43, 31, 23, 0.06);
}

.community-main {
  max-width: 1080px;
  margin: auto;
  padding: 40px 24px 80px;
}

footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--ink-soft);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
}

.panel, .sequence-card, .editor-section, .sequence-section {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.panel {
  max-width: 560px;
  margin: auto;
  padding: 32px;
}

.auth label, .editor-shell label, .admin label {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  font-weight: 700;
  font-size: 14px;
}

.auth input, .editor-shell input, .editor-shell textarea, .admin input {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  font: inherit;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth input:focus, .editor-shell input:focus, .editor-shell textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(184, 58, 40, 0.1);
}

.editor-shell textarea {
  min-height: 96px;
  resize: vertical;
}

.eyebrow {
  color: var(--red);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading {
  max-width: 680px;
  margin-bottom: 32px;
}

.page-heading h1, .panel h1, .sequence-detail h1 {
  font: 800 clamp(32px, 5.5vw, 52px)/1.08 Fraunces, Georgia, serif;
  color: var(--red);
  margin: 4px 0 12px;
}

.button, button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--red);
  color: #ffffff;
  font: 700 13.5px inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(184, 58, 40, 0.2);
  transition: all 0.2s ease;
}

.button:hover, button:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 58, 40, 0.3);
}

.button.secondary, .text-button {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  box-shadow: none;
}

.button.secondary:hover {
  background: rgba(184, 58, 40, 0.08);
}

.text-button {
  margin-top: 18px;
}

.account-actions, .editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.sequence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.sequence-card {
  padding: 24px;
  display: flex;
  min-height: 240px;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sequence-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.sequence-card h2 {
  font: 800 24px/1.15 Fraunces, Georgia, serif;
  margin: 6px 0;
  color: var(--ink);
}

.sequence-card p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.sequence-card small {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  margin: 10px 0 16px;
}

.sequence-card .button {
  margin-top: auto;
}

.sequence-detail {
  max-width: 840px;
  margin: auto;
}

.sequence-section {
  padding: 24px;
  margin: 20px 0;
}

.sequence-section h2 {
  margin: 0 0 12px;
  font: 800 22px/1.2 Fraunces, Georgia, serif;
  color: var(--red);
}

.sequence-section ol {
  padding: 0;
  list-style: none;
}

.sequence-section li {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.sequence-section li small {
  display: block;
  margin-left: auto;
  color: var(--ink-soft);
}

.empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 30px;
}

.editor-shell {
  max-width: 900px;
  margin: auto;
}

.editor-actions {
  position: sticky;
  z-index: 2;
  top: 70px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.editor-section {
  margin: 20px 0;
  padding: 20px;
}

.editor-section header {
  display: flex;
  gap: 12px;
}

.editor-section header input {
  font-weight: 700;
  flex: 1;
}

.editor-section ol {
  min-height: 30px;
  padding: 0;
  list-style: none;
}

.editor-section li {
  display: grid;
  grid-template-columns: 1fr 90px 42px;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.add-pose {
  display: flex;
  gap: 10px;
}

.add-pose input {
  flex: 1;
}

.switch {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}

.admin pre {
  overflow: auto;
  padding: 14px;
  background: #f5efe4;
  border-radius: 12px;
  font-size: 13px;
}

/* Slideshow / Flow Player Zen */
.slideshow {
  max-width: 920px;
  margin: auto;
  text-align: center;
}

.slideshow header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.slideshow-stage {
  min-height: 60vh;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px;
}

.slideshow-stage img {
  width: min(440px, 80vw);
  height: min(440px, 55vh);
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(43, 31, 23, 0.12));
}

.slideshow-stage h1 {
  font: 800 clamp(28px, 5vw, 48px)/1.05 Fraunces, Georgia, serif;
  color: var(--red);
  margin: 12px 0 0;
}

.slideshow-progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(59, 42, 30, 0.1);
  overflow: hidden;
}

.slideshow-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 0.2s linear;
}

.slideshow-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 24px 0;
}

.slideshow-help {
  font-size: 12.5px;
  color: var(--ink-soft);
}

@media (max-width: 768px) {
  .community-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }
  .sequence-grid {
    grid-template-columns: 1fr;
  }
  .editor-section li {
    grid-template-columns: 1fr 70px 38px;
  }
  .community-main {
    padding: 24px 16px 60px;
  }
}

/* Sign in / create account: compact card with the gnome beside the form */
.community-main:has(.auth-card) { padding-top: 28px; padding-bottom: 28px; }
.auth-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 8px 20px;
  max-width: 700px;
  padding: 18px 28px 18px 14px;
}
.auth-gnome { width: 230px; height: auto; align-self: center; justify-self: center; filter: drop-shadow(0 6px 10px rgba(43, 31, 23, 0.14)); }
.auth-card h1 { font-size: clamp(26px, 4vw, 34px); margin: 2px 0 12px; }
.auth-card form { display: grid; gap: 10px; }
.auth-card label { margin: 0; gap: 4px; font-size: 13px; }
.auth-card input { padding: 9px 12px; }
.auth-card form > button[type="submit"] { width: 100%; min-height: 42px; margin-top: 2px; }
.auth-social { display: grid; gap: 8px; }
.auth-alt {
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
  font-weight: 600;
}
a.auth-alt { align-items: center; text-decoration: none; }
.auth-alt:hover:not(:disabled) { background: #faf6ee; transform: none; box-shadow: none; }
.auth-alt:disabled { cursor: not-allowed; opacity: 0.72; }
.auth-alt span { flex: 1; text-align: left; }
.auth-alt em { font: 700 10.5px/1 "DM Sans", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); background: var(--kraft); padding: 4px 8px; border-radius: 99px; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; font-size: 12px; color: var(--ink-soft); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.auth-demo { margin: 10px 0 0; padding: 7px 10px; background: rgba(59, 42, 30, 0.04); border-radius: 10px; font-size: 11.5px; color: var(--ink-soft); }
.auth-foot { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.auth-foot a { color: var(--red); font-weight: 700; }
.auth-card .legal-note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 560px) {
  .auth-card { grid-template-columns: 1fr; padding: 20px 18px; gap: 0; }
  .auth-card { position: relative; }
  .auth-gnome { position: absolute; top: 10px; right: 12px; width: 76px; }
  .auth-card .eyebrow, .auth-card h1 { padding-right: 84px; }
}
