:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #151716;
  color: #fff;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background: #101211;
}

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

.app-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #101211;
}

.verse-card {
  position: relative;
  width: 100vw;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #222 center / cover no-repeat;
  touch-action: pan-y;
}

.shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(13, 15, 16, .16), rgba(13, 15, 16, .2) 42%, rgba(13, 15, 16, .6)),
    linear-gradient(to right, rgba(8, 11, 12, .36), transparent 58%);
}

.icon-button,
.brand-link,
.saved-link,
.close-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.favorite-button {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

.favorite-button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: .82;
  filter: brightness(0) invert(1);
  transition: transform .18s ease, opacity .18s ease;
}

.favorite-button::after {
  content: "♥";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .96);
  font-size: 24px;
  line-height: 1;
  opacity: 0;
  transform: scale(.78);
  transition: opacity .18s ease, transform .18s ease;
}

.favorite-button[aria-pressed="true"] img {
  opacity: 0;
  transform: scale(.86);
}

.favorite-button[aria-pressed="true"]::after {
  opacity: 1;
  transform: scale(1);
}

.brand-link {
  position: absolute;
  top: max(22px, calc(env(safe-area-inset-top) + 2px));
  right: 22px;
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .56);
  background: rgba(16, 18, 18, .18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.eyebrow {
  position: absolute;
  left: 30px;
  right: 30px;
  top: calc(max(74px, env(safe-area-inset-top)) + 44px);
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  font-weight: 700;
}

.verse-copy {
  position: absolute;
  left: 50%;
  width: min(calc(100% - 60px), 520px);
  top: 50%;
  transform: translate(-50%, -44%);
  color: #fff;
  text-align: center;
  max-height: min(38dvh, 390px);
}

.verse-copy h1 {
  max-width: 16ch;
  margin: 0 auto;
  color: rgba(255, 255, 255, .94);
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .28);
}

@media (orientation: landscape) {
  .verse-copy {
    width: min(calc(100% - 120px), 760px);
  }

  .verse-copy h1 {
    max-width: 30ch;
  }
}

.verse-copy.medium h1 {
  font-size: 28px;
}

.verse-copy.compact h1 {
  font-size: 24px;
}

.verse-copy.tiny h1 {
  font-size: 21px;
  line-height: 1.12;
}

.verse-copy.micro h1 {
  font-size: 19px;
  line-height: 1.1;
}

.verse-copy p {
  margin: 18px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, .9);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}

.cross-mark {
  display: block;
  width: 24px;
  height: auto;
  margin: 12px auto 0;
  opacity: .82;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .18));
}

.verse-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.feeling-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: #8f5260;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.bottom-nav {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: max(26px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.mood-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.mood-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.mood-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .42);
}

.mood-sheet {
  position: relative;
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 8px;
  background: rgba(253, 250, 244, .94);
  color: #2d2921;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
}

.mood-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 20px 8px;
}

.mood-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.mood-subtitle {
  max-width: 340px;
  margin: 8px 0 0;
  color: #786c63;
  font-size: 13px;
  line-height: 1.42;
}

.mood-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #eee6da;
  color: #302a22;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px 20px;
}

.tag-chip {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #dccabb;
  border-radius: 999px;
  background: #fffaf3;
  color: #4c4137;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tag-chip.active {
  border-color: #8f5260;
  background: #8f5260;
  color: #fff;
}

.saved-link {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: 22px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  background: rgba(15, 18, 18, .18);
  border: 1px solid rgba(255, 255, 255, .42);
  backdrop-filter: blur(8px);
}

.saved-link span {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #2c2a25;
  font-size: 11px;
  font-weight: 800;
}

.pagination {
  justify-self: center;
  display: flex;
  gap: 7px;
  align-items: center;
}

.pagination span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
}

.pagination span.active {
  width: 19px;
  background: #fff;
}

.favorites-page {
  overflow: auto;
  background: #fbfaf7;
  color: #29241d;
}

.favorites-shell {
  width: min(100%, 620px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px 36px;
}

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

.favorites-topbar p {
  margin: 0 0 2px;
  color: #746b60;
  font-size: 13px;
  font-weight: 700;
}

.favorites-topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.back-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eee6da;
  color: #302a22;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
}

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

.favorite-item {
  border: 1px solid #e2d4c2;
  border-radius: 8px;
  padding: 16px;
  background: #fffaf3;
  text-align: left;
  color: inherit;
}

.favorite-item p {
  margin: 0;
  color: #332f28;
  font-size: 16px;
  line-height: 1.42;
}

.favorite-item span {
  display: block;
  margin-top: 8px;
  color: #746b60;
  font-size: 13px;
}

.empty-state {
  margin: 10px 0 0;
  padding: 28px 14px;
  border: 1px dashed #d7c7b3;
  border-radius: 8px;
  color: #746b60;
  text-align: center;
}

@media (max-width: 360px) {
  .verse-copy h1 {
    font-size: 29px;
  }

  .verse-copy.medium h1 {
    font-size: 26px;
  }

  .verse-copy.compact h1 {
    font-size: 22px;
  }

  .verse-copy.tiny h1 {
    font-size: 19px;
  }

  .verse-copy.micro h1 {
    font-size: 19px;
  }
}
