:root {
  --pink: #f3a8d8;
  --pink-soft: #ffe5f4;
  --yellow: #fff200;
  --ink: #121212;
  --paper: #fbf8f4;
  --white: #ffffff;
  --muted: #68636a;
  --line: rgba(18, 18, 18, 0.14);
  --line-strong: rgba(18, 18, 18, 0.28);
  --danger: #b42318;
  --radius: 22px;
  --shadow: 0 16px 44px rgba(32, 21, 28, 0.10);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 242, 0, 0.12), transparent 22rem),
    linear-gradient(180deg, #fff 0, var(--paper) 34rem);
}

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

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(18, 18, 18, 0.45);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--pink);
  border-bottom: 3px solid var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(115deg, transparent 0 63%, rgba(255,255,255,0.82) 63.2% 72%, transparent 72.2%),
    radial-gradient(circle at 12% 84%, rgba(255,255,255,0.22), transparent 18rem);
}

.hero-grid {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--yellow);
}

.brand-text {
  min-width: 0;
}

.brand-kicker,
.section-kicker,
.modal-kicker {
  display: block;
  margin: 0 0 7px;
  font-size: 0.71rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-text h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.8rem, 10vw, 5rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.brand-text p {
  max-width: 630px;
  margin: 10px 0 0;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 650;
}

.admin-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.admin-button svg,
.icon-button svg,
.search-control svg,
.edit-question-button svg,
.admin-action svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.pop-star {
  position: absolute;
  width: 54px;
  aspect-ratio: 1;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 60% 36%, 87% 13%, 71% 43%, 100% 50%, 70% 58%, 87% 87%, 59% 66%, 50% 100%, 41% 65%, 13% 87%, 29% 57%, 0% 50%, 31% 42%, 13% 13%, 41% 35%);
}

.pop-star-one {
  left: 8px;
  bottom: -12px;
  transform: rotate(14deg);
}

.pop-star-two {
  right: 30%;
  top: -16px;
  transform: rotate(-8deg) scale(0.8);
}

.pop-dot-field {
  position: absolute;
  right: -30px;
  bottom: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.5;
  background-image: radial-gradient(var(--ink) 1.5px, transparent 1.5px);
  background-size: 9px 9px;
  transform: rotate(-9deg);
  z-index: -1;
}

.main-content {
  width: min(900px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.search-section {
  position: sticky;
  top: 8px;
  z-index: 5;
  margin-bottom: 18px;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 7px 7px 0 var(--ink);
  backdrop-filter: blur(14px);
}

.search-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.1;
}

.search-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin-top: 16px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
}

.search-control:focus-within {
  box-shadow: 0 0 0 4px rgba(243, 168, 216, 0.42);
}

.search-control input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.search-control input::placeholder {
  color: #878087;
}

.clear-search {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--pink-soft);
  cursor: pointer;
}

.clear-search svg {
  width: 18px;
  height: 18px;
}

.category-list {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.category-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-strong);
  font-size: 0.9rem;
}

.edit-mode-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.74rem;
  font-weight: 850;
}

.questions-list {
  display: grid;
  gap: 12px;
}

.question-card {
  overflow: hidden;
  border: 1.5px solid var(--line-strong);
  border-radius: 20px;
  background: var(--white);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.question-card.is-open {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.question-topline {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px 0;
}

.question-number {
  display: inline-grid;
  min-width: 38px;
  height: 30px;
  padding: 0 7px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--yellow);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.question-category {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-question-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--pink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.edit-question-button svg {
  width: 15px;
  height: 15px;
}

.question-trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 14px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.question-title {
  flex: 1;
  font-size: clamp(1.04rem, 4vw, 1.2rem);
  line-height: 1.38;
  font-weight: 800;
}

.chevron-wrap {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
}

.chevron-wrap svg {
  width: 21px;
  height: 21px;
  transition: transform 180ms ease;
}

.question-card.is-open .chevron-wrap svg {
  transform: rotate(180deg);
}

.question-content {
  padding: 0 14px 17px;
  animation: reveal 180ms ease both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.bible-reference {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 850;
}

blockquote {
  position: relative;
  margin: 14px 0;
  padding: 17px 17px 17px 20px;
  border-left: 5px solid var(--pink);
  border-radius: 0 15px 15px 0;
  background: #f7f4f1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  line-height: 1.65;
}

.message-box {
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--yellow);
}

.message-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.message-box p {
  margin: 0;
  line-height: 1.55;
  font-weight: 680;
}

.empty-state {
  padding: 48px 24px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
}

.empty-symbol {
  width: 64px;
  height: 64px;
  display: grid;
  margin: 0 auto 14px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: Impact, sans-serif;
  font-size: 2rem;
}

.empty-state h2 {
  margin: 0;
}

.empty-state p {
  max-width: 500px;
  margin: 9px auto 20px;
  color: var(--muted);
  line-height: 1.5;
}

.button {
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  font-weight: 850;
  cursor: pointer;
}

.button-primary {
  background: var(--ink);
  color: var(--white);
}

.button-secondary {
  background: var(--white);
}

.footer {
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.footer p {
  margin: 0;
  line-height: 1.5;
}

.footer p + p {
  margin-top: 5px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  padding: 12px;
  background: rgba(13, 11, 12, 0.68);
  backdrop-filter: blur(7px);
}

.modal-panel {
  width: min(610px, 100%);
  max-height: calc(100vh - 24px);
  margin: 0 auto;
  overflow-y: auto;
  border: 2px solid var(--ink);
  border-radius: 24px 24px 16px 16px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--pink);
}

.modal-panel-wide {
  width: min(760px, 100%);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 19px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-kicker {
  color: #a14b7f;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
}

.admin-panel-content,
.edit-form {
  padding: 18px;
}

.admin-callout {
  padding: 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--pink-soft);
}

.admin-callout p {
  margin: 5px 0 0;
  color: #564b52;
  line-height: 1.45;
}

.editor-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  cursor: pointer;
}

.editor-toggle span {
  display: grid;
  gap: 4px;
}

.editor-toggle small,
.admin-action small {
  color: var(--muted);
  line-height: 1.35;
}

.editor-toggle input {
  width: 48px;
  height: 25px;
  accent-color: var(--ink);
}

.admin-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.admin-action > span {
  display: grid;
  gap: 3px;
}

.admin-action-danger {
  border-color: rgba(180, 35, 24, 0.45);
  color: var(--danger);
}

.admin-file-action input {
  display: none;
}

.edit-form {
  display: grid;
  gap: 14px;
}

.edit-form label {
  display: grid;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 800;
}

.edit-form input,
.edit-form textarea,
.edit-form select {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 13px;
  font-size: 1rem;
  font-weight: 500;
  resize: vertical;
}

.edit-form input:disabled {
  opacity: 0.65;
}

.field-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80;
  width: min(420px, calc(100% - 28px));
  padding: 13px 16px;
  transform: translateX(-50%);
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 800;
  text-align: center;
  animation: toast-in 180ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (min-width: 680px) {
  .hero-grid {
    padding-top: 38px;
    padding-bottom: 42px;
  }

  .brand-logo {
    width: 102px;
    height: 102px;
  }

  .brand-text p {
    font-size: 1.05rem;
  }

  .main-content {
    padding-top: 32px;
  }

  .search-section {
    padding: 24px;
  }

  .question-topline,
  .question-trigger,
  .question-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .modal-panel {
    border-radius: 24px;
  }

  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-action-danger {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .hero-grid {
    align-items: flex-start;
  }

  .brand-logo {
    width: 66px;
    height: 66px;
    box-shadow: 5px 5px 0 var(--yellow);
  }

  .brand-kicker {
    display: none;
  }

  .brand-text h1 {
    font-size: 3.15rem;
  }

  .brand-text p {
    font-size: 0.87rem;
  }

  .admin-button {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .admin-button span {
    display: none;
  }

  .search-section {
    top: 5px;
    padding: 17px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .search-copy p {
    display: none;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* DKJTYS v2 — search, category select and mobile UX refinements */
.search-section {
  position: relative;
  top: auto;
  padding: 22px;
}

.search-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.question-count-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.8fr);
  gap: 12px;
  margin-top: 17px;
}

.search-field,
.category-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.control-label {
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.search-control {
  min-height: 54px;
  margin-top: 0;
  background: var(--white);
}

.category-select {
  width: 100%;
  min-height: 54px;
  padding: 0 42px 0 14px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background-color: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 750;
  cursor: pointer;
}

.category-select:focus {
  box-shadow: 0 0 0 4px rgba(243, 168, 216, 0.42);
}

.result-summary > span:first-child {
  display: grid;
  gap: 2px;
}

.result-summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.summary-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.clear-filters-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.question-card {
  box-shadow: 0 2px 0 rgba(18, 18, 18, 0.04);
}

.question-card:hover {
  border-color: var(--ink);
}

.bible-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.translation-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.translation-footer {
  margin: 22px 4px 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 720px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .search-heading-row {
    align-items: center;
  }
}

@media (max-width: 560px) {
  .hero-grid {
    width: min(100% - 24px, 1120px);
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-text h1 {
    font-size: 2.9rem;
  }

  .brand-text p {
    max-width: 230px;
    margin-top: 7px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .main-content {
    width: min(100% - 18px, 900px);
    padding-top: 14px;
  }

  .search-section {
    padding: 16px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .search-copy h2 {
    font-size: 1.25rem;
  }

  .search-copy p {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .question-count-badge {
    padding: 6px 8px;
    font-size: 0.69rem;
  }

  .filter-grid {
    margin-top: 14px;
    gap: 10px;
  }

  .search-control,
  .category-select {
    min-height: 50px;
  }

  .result-summary {
    align-items: flex-end;
    margin-top: 13px;
    padding-top: 11px;
  }

  .summary-actions {
    flex-wrap: wrap;
  }

  .question-topline {
    padding: 12px 12px 0;
  }

  .question-trigger {
    gap: 11px;
    padding: 13px 12px 15px;
  }

  .question-content {
    padding: 0 12px 14px;
  }

  .question-title {
    font-size: 1rem;
  }

  .chevron-wrap {
    width: 36px;
    height: 36px;
  }

  blockquote {
    margin: 12px 0;
    padding: 15px 14px 15px 17px;
    font-size: 0.98rem;
  }

  .message-box {
    padding: 14px;
  }

  .translation-note {
    display: none;
  }
}
