:root {
  --ink: #1c1c1e;
  --muted: #6b6b70;
  --paper: #fafafa;
  --card: #ffffff;
  --line: #e6e5e2;
  --accent: #51cc8c;
  --max-width: 1080px;

  --color-green: #51cc8c;
  --color-violet: #af7cff;
  --color-red: #d45a54;
  --color-black: #1c1c1e;
  --color-gray: #b0b0b0;
  --color-white: #ffc75c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: var(--color-green);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 56px 0 8px;
}

.site-header img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
}

.site-header h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 4px 0 0;
}

/* Hero: text + phone mockup side by side */

.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
  padding: 40px 0 64px;
}

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

.about p {
  font-size: 1.05rem;
}

.store-links {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 10px;
  margin: 10px 0 28px;
  flex-wrap: wrap;
}

.social-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.social-button.facebook {
  background: #1877f2;
}

.social-button.instagram {
  background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
}

.contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.contact a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

/* Phone mockup */

.phone-stage {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone {
  width: 300px;
  height: 620px;
  background: #0b0b0c;
  border-radius: 48px;
  padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.phone::before {
  /* side buttons, purely decorative */
  content: "";
  position: absolute;
  left: -2px;
  top: 130px;
  width: 3px;
  height: 60px;
  background: #1c1c1e;
  border-radius: 2px;
  box-shadow: 0 90px 0 #1c1c1e;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--card);
  border-radius: 34px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scrollbar-width: none;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

.notch {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 4px;
  background: var(--card);
  pointer-events: none;
  transition: background-color 0.2s ease;
}

.notch::after {
  content: "";
  width: 90px;
  height: 26px;
  background: #0b0b0c;
  border-radius: 16px;
}

.phone-hint {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  max-width: 260px;
}

/* Screens inside the phone */

.screen {
  display: none;
  min-height: 100%;
  padding-bottom: 24px;
}

.screen.active {
  display: block;
}

/* Calendar list screen */

.calendar-header {
  padding: 8px 20px 4px;
  font-size: 1.5rem;
  font-weight: 700;
}

.calendar-list {
  padding: 4px 0 12px;
}

.calendar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.calendar-row:active {
  background: #f2f2f2;
}

.calendar-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.calendar-row .names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-row .nice-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.calendar-row .header-name {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Detail screen */

.detail-topbar {
  position: sticky;
  top: 40px;
  z-index: 4;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--card);
  box-shadow: 0 1px 0 var(--line);
  transition: background-color 0.2s ease;
}

.back-button {
  border: none;
  background: none;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 500;
}

.detail-title-block {
  padding: 4px 20px 10px;
}

.detail-title-block .nice-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 2px;
}

.detail-title-block .header-name {
  color: var(--muted);
  font-size: 1rem;
}

.detail-image {
  width: 100%;
  aspect-ratio: 4.14 / 1;
  object-fit: cover;
  display: block;
}

.detail-body {
  padding: 16px 20px 4px;
}

.detail-body h3 {
  font-size: 0.95rem;
  text-transform: none;
  margin: 18px 0 6px;
  color: var(--ink);
}

.prayer-text {
  white-space: pre-line;
  font-size: 0.92rem;
  color: #333;
}

.reading-row {
  border-top: 1px solid var(--line);
}

.reading-row:last-child {
  border-bottom: 1px solid var(--line);
}

.reading-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.reading-toggle .label-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reading-toggle .label {
  color: var(--muted);
  font-size: 0.8rem;
}

.reading-toggle .reference {
  font-size: 0.95rem;
  font-weight: 600;
}

.chevron {
  color: #bbb;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.reading-row.expanded .chevron {
  transform: rotate(90deg);
}

.reading-excerpt {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  font-size: 0.88rem;
  color: #444;
}

/* Generous enough to clear even a full chapter — the transition timing
   function makes short texts still feel snappy despite the fixed ceiling. */
.reading-row.expanded .reading-excerpt {
  max-height: 6000px;
  padding-bottom: 14px;
}

.psalm-line {
  margin: 0;
}

.psalm-line.indent {
  padding-left: 20px;
}

.open-in-bible-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 8px);
  max-width: 220px;
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  font-size: 0.8rem;
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.about-text {
  font-size: 0.92rem;
  color: #333;
  margin: 4px 0 0;
}

.hymn-list {
  white-space: pre-line;
  font-size: 0.92rem;
  color: #333;
  margin: 0 0 10px;
}

.extended-hymn-link {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 4px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.verse-text {
  font-size: 0.92rem;
  font-style: italic;
  color: #333;
  white-space: pre-line;
  margin: 0 0 4px;
}

.verse-reference {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.decoration-lines {
  white-space: pre-line;
  font-size: 0.92rem;
  color: #333;
  margin: 0;
}

/* Other apps */

.other-apps {
  padding: 8px 0 72px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.other-apps h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.app-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  min-width: 220px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.25);
}

.app-card img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  flex-shrink: 0;
}

.app-card .app-name {
  font-weight: 700;
}

.app-card .app-desc {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.color-stripe {
  display: flex;
  height: 8px;
}

.color-stripe span {
  flex: 1;
}

.footer-content {
  padding: 28px 0 56px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-content a {
  color: var(--muted);
}

/* Utökade psalmförslag — a third screen inside the phone mockup, styled to
   match the other in-phone screens rather than as a standalone page. */

.cycle-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 2px 0 0;
}

.psalmforslag-comment {
  font-style: italic;
  color: #444;
  font-size: 0.88rem;
  margin: 4px 0 18px;
}

.hymn-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.hymn-table caption {
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  caption-side: top;
}

.hymn-table tr {
  border-bottom: 1px solid var(--line);
}

.hymn-table td {
  padding: 8px 0;
  font-size: 0.88rem;
}

.hymn-table td:last-child {
  text-align: right;
  color: var(--muted);
}

.other-hymns-block {
  margin: 0;
}

.psalmforslag-footnote {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}
