:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #fbfaf7;
  --surface-strong: #ffffff;
  --ink: #202522;
  --muted: #6f746f;
  --soft: #eeece6;
  --line: #dedbd2;
  --accent: #3f6f68;
  --accent-2: #8f5645;
  --accent-3: #b79b5b;
  --accent-soft: #e6efed;
  --shadow: 0 12px 30px rgba(37, 39, 35, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #171918;
  --surface: #1e211f;
  --surface-strong: #252925;
  --ink: #f2f0ea;
  --muted: #b6b1a7;
  --soft: #30342f;
  --line: #3b403b;
  --accent: #91bdb5;
  --accent-2: #d48b75;
  --accent-3: #d6bd74;
  --accent-soft: #263936;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body.locked .app-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface-strong);
  color: var(--ink);
}

select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface-strong);
  color: var(--ink);
}

dialog {
  color: var(--ink);
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 78%);
}

.hidden {
  display: none !important;
}

.view-panel.hidden {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg), transparent 12%);
}

body.locked .auth-screen {
  display: grid;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(100%, 410px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 2rem;
}

.auth-copy,
.auth-error {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-error {
  min-height: 20px;
  color: var(--accent-2);
  font-weight: 750;
}

.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.auth-mode-button {
  min-height: 36px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-mode-button.active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.app-shell {
  display: grid;
  grid-template-columns: 148px minmax(230px, 280px) minmax(390px, 1fr) minmax(260px, 340px);
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 16px 10px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 20%);
}

.rail-logo,
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
}

.rail-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
}

.rail-group {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 28%);
}

.rail-logo + .rail-group {
  margin-top: 14px;
}

.rail-bottom {
  margin-top: auto;
  border-bottom: 0;
}

.rail-label {
  margin: 0 0 2px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.rail-logo {
  width: 100%;
  height: 42px;
  border: 0;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 800;
}

.rail-button.active,
.rail-button:hover,
.icon-button:hover {
  border-color: color-mix(in srgb, var(--accent), white 20%);
  background: var(--accent-soft);
  color: var(--ink);
}

.sidebar,
.details {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 6%);
}

.details {
  border-right: 0;
  border-left: 1px solid var(--line);
  overflow: auto;
}

.brand-block,
.session-block,
.chat-header,
.panel-heading,
.header-actions {
  display: flex;
  align-items: center;
}

.brand-block,
.chat-header,
.panel-heading {
  justify-content: space-between;
  gap: 14px;
}

.eyebrow,
.nav-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.45rem;
}

h2 {
  margin-bottom: 0;
  font-size: 1.85rem;
}

h3 {
  margin-bottom: 0;
  font-size: 0.96rem;
}

.search-wrap {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 6px;
  margin: 24px 0;
  padding: 0 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.session-block {
  gap: 12px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.session-block strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-wrap input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.channel-list {
  display: grid;
  gap: 10px;
}

#channelList {
  display: grid;
  gap: 8px;
}

.channel-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.channel-button:hover,
.channel-button.active {
  border-color: var(--line);
  background: var(--surface-strong);
}

.channel-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--accent);
  font-weight: 800;
}

.channel-name {
  display: block;
  font-weight: 750;
}

.channel-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  min-width: 25px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent-2);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.ritual-panel,
.spotlight,
.detail-section {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 1px 0 rgba(37, 39, 35, 0.03);
}

.ritual-panel p,
.spotlight p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tiny-button,
.tool-button,
.send-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 750;
}

.tiny-button {
  padding: 0 10px;
  font-size: 0.78rem;
}

.tool-button,
.send-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.tool-button:not(.quiet),
.send-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}

.tool-button.quiet:hover,
.tiny-button:hover {
  background: var(--accent-soft);
}

.chat,
.bible,
.prayer,
.prayer-list,
.books,
.notifications,
.profile,
.admin {
  display: grid;
  min-width: 0;
  max-height: 100vh;
  padding: 22px 24px 18px;
}

.chat {
  grid-template-rows: auto auto 1fr auto;
}

.bible,
.prayer,
.prayer-list,
.books,
.notifications,
.profile,
.admin {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
}

.chat-header {
  padding-bottom: 16px;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.spotlight {
  display: grid;
  grid-template-columns: minmax(120px, 210px) 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 0;
  box-shadow: none;
  background: color-mix(in srgb, var(--surface-strong), var(--accent-soft) 38%);
}

.pinned-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.pin-list,
.search-results {
  display: grid;
  gap: 8px;
}

.pin-item,
.search-result {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.pin-item span,
.search-result span,
.search-result small {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results {
  margin-top: -14px;
  margin-bottom: 18px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 20px 4px;
  overflow: auto;
}

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

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  color: white;
  font-weight: 850;
  box-shadow: inset 0 -12px 22px rgba(0, 0, 0, 0.13);
}

.message-bubble {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.message-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.message-author {
  font-weight: 800;
}

.message-time {
  color: var(--muted);
  font-size: 0.78rem;
}

.message-text {
  margin-bottom: 10px;
  line-height: 1.45;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
}

.reaction strong {
  font-size: 0.76rem;
}

.add-reaction {
  min-width: 34px;
  justify-content: center;
}

.composer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  position: relative;
}

.message-field {
  display: block;
  min-width: 0;
}

.emoji-tray {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: grid;
  grid-template-columns: repeat(5, 38px);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  z-index: 5;
}

.emoji-choice {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 1.12rem;
}

.emoji-choice:hover {
  background: var(--accent-soft);
}

textarea {
  display: block;
  width: 100%;
  max-height: 130px;
  min-height: 42px;
  padding: 11px 12px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface-strong);
  color: var(--ink);
}

textarea:focus,
.search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 78%);
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 96px 96px;
  gap: 10px;
}

.photo-card {
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}

.photo-one {
  grid-row: 1 / 3;
  background:
    linear-gradient(135deg, rgba(36, 92, 90, 0.12), rgba(179, 75, 53, 0.08)),
    url("assets/table-night.svg");
}

.photo-two {
  background:
    linear-gradient(135deg, rgba(210, 165, 49, 0.14), rgba(36, 92, 90, 0.08)),
    url("assets/park-day.svg");
}

.photo-three {
  background:
    linear-gradient(135deg, rgba(179, 75, 53, 0.14), rgba(36, 92, 90, 0.1)),
    url("assets/game-night.svg");
}

.people-list,
.plan-list,
.event-list,
.shared-photo-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.person,
.plan,
.event-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
}

.person .avatar {
  width: 34px;
  height: 34px;
  font-size: 0.78rem;
}

.person strong,
.plan strong,
.event-item strong {
  display: block;
  font-size: 0.9rem;
}

.person span,
.plan span,
.event-item span,
#onlineCount {
  color: var(--muted);
  font-size: 0.8rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.calendar-title {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.calendar-day,
.calendar-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 6px;
  font-size: 0.76rem;
}

.calendar-day {
  color: var(--muted);
  font-weight: 800;
}

.calendar-cell {
  border: 1px solid var(--line);
  background: var(--surface);
}

.calendar-cell.today {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 900;
}

.calendar-cell.has-event {
  background: var(--accent-soft);
  box-shadow: inset 0 -3px 0 var(--accent-3);
}

.muted-cell {
  visibility: hidden;
}

.event-item {
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.event-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.rsvp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.event-date {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 42px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--surface);
}

.event-date strong,
.event-date span {
  color: inherit;
}

.event-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.event-dialog {
  width: min(100% - 32px, 430px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.event-dialog::backdrop {
  background: rgba(0, 0, 0, 0.36);
}

.event-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

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

.shared-photo {
  margin: 0;
  min-width: 0;
}

.shared-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.shared-photo figcaption {
  display: grid;
  gap: 1px;
  margin-top: 6px;
}

.shared-photo figcaption strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-photo figcaption span {
  color: var(--muted);
  font-size: 0.72rem;
}

.bible-card,
.prayer-card,
.reflection-section,
.prayer-request-form,
.prayer-request-panel,
.book-form,
.book-list-panel,
.profile-form,
.admin-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.books {
  grid-template-rows: auto minmax(0, 1fr);
}

.books-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.book-form,
.book-list-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.book-list-panel {
  min-height: 0;
  overflow: auto;
}

.book-list {
  display: grid;
  gap: 14px;
}

.book-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.book-cover {
  display: grid;
  place-items: center;
  width: 94px;
  min-height: 136px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--accent);
  font-weight: 900;
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.book-body p,
.review-item p {
  margin-bottom: 0;
  line-height: 1.45;
}

.book-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.book-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.review-list {
  display: grid;
  gap: 8px;
}

.review-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.review-form {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 8px;
}

.profile {
  grid-template-rows: auto minmax(0, 1fr);
}

.profile-form {
  display: grid;
  align-content: start;
  gap: 14px;
  max-width: 620px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.check-row span {
  margin-bottom: 0;
}

.prayer-list {
  grid-template-rows: auto minmax(0, 1fr);
}

.prayer-list-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.prayer-request-form,
.prayer-request-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.prayer-request-panel {
  min-height: 0;
  overflow: auto;
}

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

.prayer-request {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.prayer-request-body {
  min-width: 0;
}

.prayer-request-body p {
  margin-bottom: 10px;
  color: var(--ink);
  line-height: 1.45;
}

.prayer-request-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prayer-request-footer span {
  color: var(--muted);
  font-size: 0.8rem;
}

.active-prayer-mark {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.admin {
  grid-template-rows: auto minmax(0, 1fr);
}

.notification-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 340px);
  gap: 16px;
  min-height: 0;
}

.notification-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.notification-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.notification-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.notification-item.unread {
  border-color: color-mix(in srgb, var(--accent), var(--line) 35%);
  background: color-mix(in srgb, var(--accent-soft), var(--surface-strong) 45%);
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item span,
.notification-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.notification-preferences .check-row {
  margin-top: -4px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
  gap: 16px;
  min-height: 0;
  overflow: auto;
}

.admin-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.daily-text-panel {
  grid-column: 1 / -1;
}

.daily-text-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.daily-text-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.daily-text-item:hover {
  background: var(--accent-soft);
}

.daily-text-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.danger-button {
  border-color: color-mix(in srgb, var(--accent-2), var(--line) 30%);
  color: var(--accent-2);
}

.danger-button:hover {
  background: color-mix(in srgb, var(--accent-2), transparent 88%);
}

.admin-row strong,
.admin-row span {
  display: block;
}

.admin-row span,
.admin-result {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-result {
  min-height: 20px;
  margin-bottom: 0;
  font-weight: 750;
}

.office-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.office-tab {
  min-height: 36px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.office-tab.active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.prayer-card {
  min-height: 0;
  overflow: auto;
}

.prayer-sections {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.prayer-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.prayer-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.prayer-section p:last-child {
  margin-bottom: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.68;
}

.bible-passage {
  margin: 18px 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.72;
}

.bible-prompt {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}

.text-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.reading-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
}

.reflection-section {
  min-height: 0;
  overflow: auto;
}

.reflection-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.reflection-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.reflection-item p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.reflection-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--accent-2);
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(80px);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  opacity: 0;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.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;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 132px minmax(220px, 270px) minmax(0, 1fr);
  }

  .details {
    display: none;
  }
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  .rail {
    display: none;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat {
    max-height: none;
    min-height: 72vh;
    padding: 18px 14px;
  }

  .bible,
  .prayer,
  .prayer-list,
  .books,
  .notifications,
  .profile,
  .admin {
    max-height: none;
    min-height: 72vh;
    padding: 18px 14px;
  }

  .prayer-list-grid,
  .books-grid,
  .notification-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .book-cover {
    width: 72px;
    min-height: 104px;
  }

  .review-form {
    grid-template-columns: 1fr;
  }

  .chat-header,
  .spotlight {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .chat-header {
    display: grid;
  }

  .header-actions {
    justify-content: start;
  }

  h2 {
    font-size: 1.45rem;
  }

  .composer {
    grid-template-columns: 42px 1fr;
  }

  .send-button {
    grid-column: 1 / -1;
    justify-content: center;
  }
}
