:root {
  color-scheme: dark;
  --bg: #101827;
  --bg-soft: #172235;
  --panel: #1d2a3f;
  --panel-strong: #243450;
  --text: #f5f1e8;
  --muted: #b9c0ca;
  --line: #39465c;
  --blue: #4f8fd8;
  --purple: #8f6bd8;
  --scarlet: #c84b4b;
  --gold: #d8ae4f;
  --linen: #f5f1e8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f1e8;
  --bg-soft: #ebe4d8;
  --panel: #ffffff;
  --panel-strong: #f7f3eb;
  --text: #182235;
  --muted: #5d6675;
  --line: #d7cec0;
  --blue: #245f9d;
  --purple: #7053a1;
  --scarlet: #a63737;
  --gold: #9a7427;
  --linen: #ffffff;
  --shadow: 0 18px 45px rgba(73, 58, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(79, 143, 216, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(200, 75, 75, 0.12), transparent 31%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: fixed;
  z-index: 5000;
  top: .5rem;
  left: .5rem;
  padding: .55rem .75rem;
  border-radius: .5rem;
  background: var(--gold);
  color: #0b111c;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(16, 24, 39, 0.86);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

:root[data-theme="light"] .rail {
  background: rgba(255, 255, 255, 0.78);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img,
.share-card img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.24));
}

.nav {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.nav-item {
  width: 100%;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.tile-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: var(--gold);
  font-weight: 800;
  font-size: 0.82rem;
}

.nav-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(245, 241, 232, 0.06);
  color: var(--gold);
}

.nav-icon svg,
.share-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-today { color: var(--gold); }
.nav-scripture { color: #f0bc45; }
.nav-studies { color: #e8a95c; }
.nav-wic { color: #8bc9ff; }
.nav-calendar { color: var(--blue); }
.nav-hall { color: #d8dde6; }
.nav-arena { color: #76b7ff; }
.nav-prepare { color: #6fd0a4; }
.nav-shield { color: var(--scarlet); }
.nav-mission { color: var(--purple); }
.nav-support { color: #f06f6f; }

.rail-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.nav-backdrop {
  display: none;
}

.workspace {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.menu-button {
  display: none;
}

.topbar h1,
.panel h2,
.tool-panel h2,
.share-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.7rem, 2vw, 2.35rem);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-link,
.primary-button,
.secondary-button,
.icon-button,
.menu-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.support-link,
.primary-button,
.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  background: var(--gold);
  border-color: transparent;
  color: #111827;
}

.primary-button:disabled,
.secondary-button.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.secondary-button.is-disabled {
  pointer-events: none;
}

.icon-button,
.menu-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.topbar .menu-button {
  display: none;
  width: auto;
  min-width: 58px;
  padding: 0 10px;
  font-size: 0.74rem;
}

.icon-button.small {
  width: 34px;
  height: 34px;
}

.share-icon-button {
  color: var(--gold);
}

.view {
  display: none;
}

.view.is-active {
  display: grid;
  gap: 18px;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.panel,
.tool-panel,
.share-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 42, 63, 0.9);
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .tool-panel,
:root[data-theme="light"] .share-card {
  background: rgba(255, 255, 255, 0.92);
}

.panel,
.tool-panel {
  padding: 20px;
}

.shield-panel {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px;
}

.shield-logo-column {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.shield-logo-link {
  display: block;
  width: min(100%, 340px);
}

.shield-logo {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.32));
}

.mission-panel {
  padding: 24px;
}

.support-panel {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.support-intro {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.support-intro h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.support-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wallet-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.wallet-card h3 {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 1rem;
}

.wallet-card h3 span {
  color: var(--gold);
  font-size: 0.78rem;
}

.wallet-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.wallet-card img {
  width: 100%;
  max-width: 230px;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.wallet-card code {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.support-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pma-section {
  display: grid;
  gap: 14px;
}

.pma-heading {
  max-width: 820px;
}

.pma-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 1.8vw, 1.9rem);
}

.pma-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.support-note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 16px;
}

.support-note-card.wide-note {
  grid-column: 1 / -1;
}

.support-note-card h3 {
  margin: 0 0 10px;
}

.support-note-card p,
.support-note-card li {
  color: var(--muted);
  line-height: 1.58;
}

.support-note-card p {
  margin: 0 0 10px;
}

.support-note-card p:last-child {
  margin-bottom: 0;
}

.support-note-card ul {
  margin: 0 0 10px 18px;
  padding: 0;
}

.prose-panel {
  max-width: 860px;
}

.prose-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.prose-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.72;
}

.prose-panel p:last-child {
  margin-bottom: 0;
}

.prose-panel strong,
.mission-lead {
  color: var(--text);
}

.daily-panel {
  min-height: 360px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  background:
    linear-gradient(135deg, rgba(79, 143, 216, 0.22), transparent 45%),
    var(--panel);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.scripture-text {
  margin: 16px 0;
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  line-height: 1.5;
}

.daily-scripture-link,
.daily-scripture-text-link {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.daily-scripture-link {
  color: var(--text);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(203, 213, 225, 0.5);
  text-underline-offset: 5px;
}

.daily-scripture-text-link {
  color: var(--text);
  line-height: inherit;
}

.daily-scripture-link:hover,
.daily-scripture-text-link:hover {
  color: var(--gold);
}

.daily-context-button {
  margin-left: 10px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.witness-block,
.reflection-box {
  border-left: 4px solid var(--gold);
  background: var(--panel-strong);
  padding: 14px;
  border-radius: 6px;
}

.witness-block span,
.reflection-box strong {
  color: var(--gold);
  font-weight: 900;
}

.words-context-witnesses {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding-left: 20px;
  color: var(--muted);
}

.words-context-witnesses li {
  line-height: 1.55;
}

.words-context-reflection {
  margin-top: 14px;
}

.words-context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.words-context-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 9px;
}

.witness-block .daily-witness-text {
  color: var(--muted);
  font-weight: 400;
}

.daily-witness-link {
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.witness-block p,
.reflection-box p,
.rhythm-panel p,
.panel p,
.tool-panel p {
  color: var(--muted);
  line-height: 1.62;
}

.date-stack {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.date-stack strong {
  font-size: 2rem;
}

.date-stack span {
  color: var(--muted);
}

.meter {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 18px 0;
}

.meter span {
  height: 12px;
  border-radius: 10px;
  background: var(--blue);
}

.meter span:nth-child(2n) {
  background: var(--purple);
}

.meter .sabbath {
  background: var(--gold);
}

.reading-plan-title {
  margin: 18px 0 8px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rhythm-reading {
  width: 100%;
  border: 1px solid rgba(216, 174, 79, 0.55);
  border-radius: 8px;
  background: rgba(216, 174, 79, 0.11);
  color: var(--text);
  padding: 12px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.rhythm-reading span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rhythm-reading strong {
  font-size: 1rem;
}

.rhythm-reading:disabled {
  cursor: wait;
  opacity: 0.7;
}

.action-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
}

.action-tile {
  min-height: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 4px 18px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.action-tile:first-child {
  border-left: 0;
  padding-left: 0;
}

.action-tile:last-child {
  padding-right: 0;
}

.daily-walk-intro {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.action-tile .action-copy {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow: visible;
}

.action-copy p {
  margin: 0;
}

.action-copy .action-refs {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.action-tile.is-complete {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(216, 174, 79, 0.16), var(--panel));
}

.status-pill,
.score-pill,
.module-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.search-row,
.field {
  display: grid;
  gap: 8px;
}

.search-row {
  margin-bottom: 16px;
}

.search-row label,
.field label {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search-row input,
.field input,
.field select,
.check-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--text);
  padding: 0 14px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.check-field input {
  width: 18px;
  height: 18px;
}

.scripture-panel {
  display: grid;
  gap: 16px;
}

.scripture-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(150px, 0.9fr) 100px 130px minmax(200px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.calendar-controls {
  grid-template-columns: minmax(210px, 1.2fr) minmax(160px, 0.8fr) minmax(130px, 0.6fr) minmax(190px, 0.8fr);
}

.epistle-controls {
  grid-template-columns: 130px minmax(220px, 1fr) minmax(220px, 1fr);
}

.reader-status {
  color: var(--muted);
}

.scripture-nav {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.scripture-nav strong {
  text-align: center;
  color: var(--gold);
}

.bottom-nav {
  margin-top: 6px;
}

.bible-reader {
  max-width: 860px;
}

.verse-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.verse-row.is-targeted {
  border-color: var(--gold);
  background: rgba(216, 174, 79, 0.12);
  border-radius: 8px;
  padding-inline: 10px;
}

.verse-row mark {
  background: rgba(216, 174, 79, 0.28);
  color: var(--text);
  padding: 0 2px;
}

.verse-ref {
  color: var(--gold);
  font-weight: 900;
}

.verse-text {
  color: var(--text);
  line-height: 1.72;
}

.verse-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.witness-button,
.context-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--gold);
  cursor: pointer;
  font-weight: 900;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.context-button {
  border-color: rgba(203, 213, 225, 0.72);
  color: #d6dde8;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(148, 163, 184, 0.14));
}

.witness-button svg,
.context-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.witness-button svg {
  fill: rgba(216, 174, 79, 0.16);
}

.witness-button:hover {
  border-color: var(--gold);
  background: rgba(216, 174, 79, 0.12);
}

.context-button:hover {
  border-color: #f8fafc;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(148, 163, 184, 0.22));
}

.witness-panel {
  grid-column: 2 / -1;
  display: grid;
  gap: 10px;
  border-left: 4px solid var(--gold);
  background: var(--panel-strong);
  border-radius: 6px;
  padding: 12px;
}

.words-context-panel {
  grid-column: 2 / -1;
  display: grid;
  gap: 14px;
  border-left: 4px solid #cbd5e1;
  background: var(--panel-strong);
  border-radius: 6px;
  padding: 14px;
}

.words-context-panel article {
  display: grid;
  gap: 10px;
}

.words-context-panel h3,
.words-context-panel p {
  margin: 0;
}

.words-context-panel h3 {
  color: var(--text);
}

.witness-ref {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.witness-ref:hover {
  color: var(--text);
}

.search-result {
  cursor: pointer;
  grid-template-columns: minmax(150px, 0.34fr) 1fr;
}

.calendar-panel {
  display: grid;
  gap: 16px;
}

.calendar-panel p {
  margin: 0;
}

.zk-week-head,
.zk-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.zk-week-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.zk-grid {
  align-items: stretch;
}

.zk-day {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 6px 8px;
}

.zk-day.sabbath {
  border-color: var(--purple);
  background: color-mix(in srgb, var(--purple) 16%, var(--panel-strong));
}

.zk-day.feast {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, var(--panel-strong));
}

.zk-day.today {
  outline: 2px solid var(--gold);
}

.zk-num {
  color: var(--gold);
  font-weight: 900;
}

.zk-reading {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zk-reading:hover {
  color: var(--text);
}

.zk-tag {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.3;
}

.zk-year-day {
  grid-column: 1;
  align-self: end;
  color: var(--muted);
  font-size: 0.78rem;
}

.zk-greg {
  grid-column: 2;
  justify-self: end;
  align-self: end;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.reader-list,
.module-grid {
  display: grid;
  gap: 12px;
}

.reader-item,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel-strong);
}

.module-card {
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 10px;
}

.module-card img {
  width: calc(100% + 32px);
  height: 180px;
  margin: -16px -16px 4px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.reader-item h3,
.module-card h3 {
  margin: 0 0 8px;
}

.reader-item p,
.module-card p {
  margin: 0;
}

.module-action {
  justify-self: start;
  margin-top: 4px;
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.arena-grid {
  max-width: 960px;
}

.game-shell {
  display: grid;
  min-height: calc(100vh - 124px);
}

.game-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.game-toolbar strong {
  min-width: 0;
  text-align: center;
}

#gameFrame {
  width: 100%;
  min-height: 760px;
  height: calc(100vh - 124px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f18;
}

.epistle-reader {
  max-width: 920px;
}

.epistle-result {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  text-align: left;
  padding: 14px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.epistle-result + .epistle-result {
  margin-top: 10px;
}

.epistle-result span {
  color: var(--muted);
}

.share-card {
  width: min(620px, 100%);
  padding: 30px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(216, 174, 79, 0.18), transparent 44%),
    linear-gradient(315deg, rgba(143, 107, 216, 0.16), transparent 38%),
    var(--panel);
}

.share-card p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.55;
}

.share-card span {
  color: var(--gold);
  font-weight: 900;
}

.share-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.download-shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.download-hero {
  min-height: min(680px, calc(100vh - 48px));
  display: grid;
  gap: 28px;
}

.download-topbar,
.download-hero-grid,
.download-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 42, 63, 0.82);
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .download-topbar,
:root[data-theme="light"] .download-hero-grid,
:root[data-theme="light"] .download-card {
  background: rgba(255, 255, 255, 0.86);
}

.download-topbar {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.download-hero-grid {
  padding: clamp(22px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  align-items: center;
  gap: clamp(22px, 5vw, 58px);
}

.download-copy {
  display: grid;
  gap: 16px;
}

.download-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.25rem, 7vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.download-copy p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

.download-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.download-note {
  font-size: 0.95rem;
}

.download-logo-card {
  min-height: 340px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 24%, rgba(216, 174, 79, 0.2), transparent 34%),
    var(--bg-soft);
}

.download-logo-card img {
  width: min(330px, 78%);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.32));
}

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

.download-card {
  padding: 24px;
}

.download-card h2 {
  margin: 8px 0 10px;
  font-size: 1.45rem;
}

.download-card p,
.download-steps,
.release-facts {
  color: var(--muted);
  line-height: 1.6;
}

.download-steps {
  margin: 18px 0 0;
  padding-left: 22px;
}

.download-steps li + li {
  margin-top: 8px;
}

.release-facts {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.release-facts div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.release-facts dt {
  color: var(--gold);
  font-weight: 900;
}

.release-facts dd {
  margin: 0;
}

.download-card code {
  color: var(--text);
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(280px, 84vw);
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  body.nav-open .rail {
    transform: translateX(0);
  }

  body.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    z-index: 20;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
  }

  .workspace {
    padding: 18px;
  }

  .topbar .menu-button {
    display: inline-grid;
  }

  .download-shell {
    padding: 16px;
  }

  .download-hero {
    min-height: auto;
  }

  .download-topbar,
  .download-actions {
    align-items: stretch;
  }

  .download-topbar,
  .download-hero-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-topbar {
    display: grid;
  }

  .download-logo-card {
    min-height: 260px;
  }

  .today-grid,
  .action-strip,
  .module-grid,
  .scripture-controls,
  .calendar-controls {
    grid-template-columns: 1fr;
  }

  .action-strip {
    margin-top: 14px;
  }

  .action-tile,
  .action-tile:first-child,
  .action-tile:last-child {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0;
  }

  .action-tile:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .shield-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .mission-panel {
    padding: 18px;
  }

  .support-panel {
    padding: 18px;
  }

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

  .support-note-grid {
    grid-template-columns: 1fr;
  }

  .shield-logo-link {
    width: min(74vw, 300px);
  }

  .game-toolbar {
    grid-template-columns: 1fr;
  }

  .game-toolbar strong {
    text-align: left;
  }

  #gameFrame {
    min-height: 680px;
    height: calc(100vh - 170px);
  }

  .zk-week-head,
  .zk-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
  }

  .zk-week-head span {
    font-size: 0.62rem;
  }

  .zk-day {
    min-height: 78px;
    border-radius: 6px;
    padding: 4px;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 3px;
    font-size: 0.72rem;
  }

  .zk-reading {
    font-size: 0.5rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .zk-tag {
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .zk-year-day,
  .zk-greg {
    font-size: 0.56rem;
  }

  .scripture-nav {
    grid-template-columns: minmax(76px, 1fr) minmax(0, 1.3fr) minmax(76px, 1fr);
    gap: 8px;
  }

  .scripture-nav strong {
    order: 0;
    font-size: 0.84rem;
  }

  .verse-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .search-result {
    grid-template-columns: 1fr;
  }

  .verse-actions {
    grid-column: 3;
    flex-direction: column;
    gap: 6px;
  }

  .witness-button,
  .context-button {
    width: 30px;
    height: 30px;
  }

  .witness-button svg,
  .context-button svg {
    width: 19px;
    height: 19px;
  }

  .witness-panel,
  .words-context-panel {
    grid-column: 1 / -1;
  }

  .support-link {
    padding: 0 12px;
  }
}

/* Shared Sacred Name presentation; matches the authoritative Bible reader. */
.paleo {
  font-weight: 700 !important;
  font-family: inherit;
  font-size: 1.02em;
  -webkit-text-stroke: .25px currentColor;
  text-shadow: 0 0 0 currentColor, .02em 0 currentColor, -.02em 0 currentColor;
}

/* Focused Studies and Words in Context libraries. */
.content-library-panel {
  display: grid;
  gap: 18px;
}

.content-library-heading > :last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.content-library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 560px);
}

.content-library-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.55fr);
  gap: 18px;
  align-items: start;
}

.content-library-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 270px);
  overflow-y: auto;
  padding-right: 4px;
}

.content-list-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  padding: 13px 14px;
  display: grid;
  gap: 5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.content-list-button:hover,
.content-list-button:focus-visible,
.content-list-button.is-active {
  border-color: var(--gold);
  background: rgba(218, 171, 79, 0.1);
}

.content-list-button span,
.content-list-button small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.content-list-button strong {
  line-height: 1.35;
}

.content-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: clamp(18px, 3vw, 30px);
  display: grid;
  gap: 24px;
}

.content-detail h2,
.content-detail h3,
.content-detail p {
  margin-top: 0;
}

.content-detail-header > :last-child,
.content-detail-section > :last-child,
.content-witness > :last-child {
  margin-bottom: 0;
}

.content-detail-header h2 {
  margin-bottom: 10px;
  line-height: 1.18;
}

.content-detail-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.content-label {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.content-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.content-section-heading h3 {
  margin-bottom: 0;
}

.compact-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.8rem;
}

.study-scripture {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}

.study-verse {
  line-height: 1.72;
}

.study-verse strong {
  color: var(--gold);
  white-space: nowrap;
}

.explanation-section,
.scripture-definition,
.takeaway-section {
  border-radius: 8px;
  padding: 18px;
  background: rgba(245, 241, 232, 0.045);
}

.explanation-section {
  border-top: 3px solid var(--blue);
}

.scripture-definition,
.takeaway-section {
  border-top: 3px solid var(--gold);
}

.explanation-section ul {
  margin-bottom: 0;
  padding-left: 22px;
}

.explanation-section li + li {
  margin-top: 9px;
}

.content-witness-grid,
.related-content-list {
  display: grid;
  gap: 10px;
}

.content-witness {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(9, 15, 25, 0.18);
}

.text-link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-content-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.related-content-button:hover,
.related-content-button:focus-visible {
  border-color: var(--gold);
}

.related-content-button span {
  color: var(--muted);
  font-size: 0.8rem;
}

.reference-chips,
.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reference-chips {
  margin: 12px 0 16px;
}

.reference-chip,
.content-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
}

.reference-chip {
  color: var(--blue);
  cursor: pointer;
}

.content-reflection {
  margin: 0;
}

.content-page-link {
  width: fit-content;
  text-decoration: none;
}

@media (max-width: 900px) {
  .content-library-layout {
    grid-template-columns: 1fr;
  }

  .content-library-list {
    max-height: 390px;
  }
}

@media (max-width: 600px) {
  .content-section-heading,
  .related-content-button {
    align-items: stretch;
    flex-direction: column;
  }

  .content-detail {
    padding: 17px;
  }
}
