/* The cover and directory share the same local artwork across the entry screens. */
.auth-cover > p:last-child {
  max-width: 450px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}
.auth-layout .eyebrow,
.journal-home .eyebrow,
.journal-home :is(.text-link, .card-link) {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.journal-home .app-icon,
.auth-layout .app-icon { width: 1.1em; height: 1.1em; }
.journal-home [hidden] { display: none; }
.journal-home .credit-card { flex-wrap: wrap; max-width: 30rem; }
.journal-home .credit-renewal { flex-basis: 100%; color: var(--ink-soft); font-size: .72rem; }
.journal-home .recent-section .app-icon { vertical-align: middle; }

@media (max-width: 599px), (max-width: 639px) and (max-height: 799px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  .guest-nav.on-registration > a:first-child { display: inline-flex; min-height: 44px; align-items: center; color: #fff8e9; }
  .guest-nav.on-registration > a[href="?p=register"] { display: none; }
  .journal-home,
  .auth-layout {
    --cover-shade: linear-gradient(0deg, rgb(7 27 22 / 88%) 0%, rgb(10 34 26 / 50%) 48%, rgb(12 34 25 / 5%) 95%);
    --cover-art: url("scenery/sunrise-ridges.webp");
    --cover-inset: clamp(1.12rem, 5.2vw, 1.85rem);
  }
  .auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }
  .auth-entry > .auth-copy { display: contents; }
  .auth-entry .form-card { order: 1; }
  .auth-entry .scripture-note { order: 2; }
  .auth-cover,
  .welcome-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    isolation: isolate;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: var(--cover-inset);
    border-radius: 1.2rem;
    color: #fff9ea;
    background: var(--cover-shade), var(--cover-art) 52% 43% / cover, var(--mobile-pine);
  }
  .auth-cover::before,
  .welcome-cover::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: .4rem;
    pointer-events: none;
    border: 1px solid rgb(254 244 205 / 22%);
    border-radius: .88rem;
  }
  .auth-cover {
    min-height: clamp(13rem, 54vw, 18.4rem);
    box-shadow: 0 6px 18px rgb(29 50 37 / 9%);
  }
  .auth-cover h1,
  .welcome-cover h1 {
    width: 100%;
    color: #fffdf3;
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -.046em;
    line-height: 1.02;
    text-wrap: balance;
    text-shadow: 0 2px 9px rgb(11 31 23 / 22%);
  }
  .auth-cover h1 { max-width: 15ch; margin: .6rem 0 .58rem; font-size: clamp(2.13rem, 9.8vw, 3.65rem); }
  .auth-cover h1 em { color: #f4e3ac; font-weight: inherit; }
  .auth-cover .eyebrow,
  .welcome-cover .eyebrow {
    align-items: center;
    margin: 0;
    color: #fbebbb;
    font-size: .67rem;
    letter-spacing: .145em;
    line-height: 1.4;
    text-shadow: 0 1px 4px #132d25;
  }
  .auth-cover .eyebrow .app-icon,
  .welcome-cover .eyebrow .app-icon { width: 1rem; height: 1rem; }
  .auth-cover > p:last-child {
    max-width: 36ch;
    margin: 0;
    color: #f5f3e5;
    font-size: .9rem;
    line-height: 1.46;
  }
  .auth-layout > .auth-copy:not(:has(.auth-cover)) { max-width: 36rem; padding: .4rem .24rem 0; }
  .auth-layout > .auth-copy:not(:has(.auth-cover)) h1,
  .auth-layout > .form-card:only-child h1 { font-size: clamp(2rem, 8.7vw, 3rem); }
  .auth-layout > .auth-copy:not(:has(.auth-cover)) > p:last-child { margin: 0; color: var(--mobile-muted); font-size: .96rem; line-height: 1.58; }
  .auth-layout .form-card {
    min-width: 0;
    padding: clamp(1.06rem, 4.5vw, 1.65rem);
    border: 1px solid var(--mobile-line);
    border-radius: 1.12rem;
    background: var(--mobile-paper);
    box-shadow: 0 4px 14px rgb(39 55 35 / 4%);
  }
  .auth-layout .form-card h2 {
    margin: 0 0 .65rem;
    color: var(--mobile-ink);
    font-family: var(--font-display);
    font-size: clamp(1.72rem, 7.1vw, 2.15rem);
    line-height: 1.1;
  }
  .auth-layout .form-card > .muted { margin-bottom: 1rem; color: var(--mobile-muted); line-height: 1.52; }
  .auth-layout .stack-form { gap: .38rem; }
  .auth-layout .stack-form > label:not(.auth-email-opt-in) { margin-top: .5rem; font-size: .86rem; color: var(--mobile-ink); }
  .auth-layout .stack-form > input:not([type="hidden"]) {
    min-height: 48px;
    padding: .66rem .84rem;
    border: 1px solid #bfc9b9;
    border-radius: .68rem;
    background: #fffefb;
    font-family: var(--font-body);
    font-size: 1rem;
  }
  .auth-layout .stack-form > input:focus-visible { border-color: var(--mobile-pine); outline: 3px solid rgb(52 99 74 / 19%); }
  .auth-layout :is(.button-primary, .button-secondary) { min-height: 46px; width: 100%; }
  .auth-layout .stack-form .button { margin-top: .7rem; }
  .auth-layout .form-footnote { margin: .33rem 0 0; color: var(--mobile-muted); font-size: .84rem; }
  .auth-layout .form-footnote a,
  .journal-home .empty-state a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--mobile-pine);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
  }
  .auth-layout .field-hint { margin: 0; color: var(--mobile-muted); font-size: .8rem; line-height: 1.45; }
  .auth-layout .scripture-note {
    gap: .8rem;
    width: 100%;
    max-width: none;
    margin: .1rem 0 0;
    padding: .85rem 1rem;
    border: 0;
    border-left: 2px solid var(--mobile-gold);
    background: transparent;
  }
  .auth-layout .scripture-note p { color: var(--mobile-muted); font-family: var(--font-display); font-size: 1rem; line-height: 1.5; }
  .auth-layout .scripture-note strong { display: inline-block; margin-top: .35rem; color: #775c2d; font-size: .75rem; }
  .auth-layout .scripture-note .note-mark { color: var(--mobile-gold); }
  .auth-layout .auth-email-opt-in {
    gap: .65rem;
    align-items: flex-start;
    margin: .6rem 0 0;
    padding: .8rem;
    border: 1px solid var(--mobile-line);
    border-radius: .68rem;
    background: var(--mobile-canvas);
  }
  .auth-layout .auth-email-opt-in input { width: 19px; height: 19px; min-height: 0; padding: 0; }
  .auth-layout .auth-email-opt-in small { color: var(--mobile-muted); font-size: .78rem; }

  .journal-home { display: flex; flex-direction: column; }
  .journal-home .welcome-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    align-items: stretch;
    gap: 0;
    margin: 0 0 1.6rem;
    border-radius: 1.2rem;
    box-shadow: 0 5px 16px rgb(26 49 33 / 8%);
  }
  .welcome-cover {
    min-height: clamp(12.8rem, 51vw, 17.8rem);
    border-radius: 1.2rem 1.2rem 0 0;
  }
  .welcome-cover::before { bottom: 0; border-bottom: 0; border-radius: .88rem .88rem 0 0; }
  .welcome-cover h1 {
    max-width: 20ch;
    margin: .52rem 0 .1rem;
    font-size: clamp(2.2rem, 10vw, 3.7rem);
  }
  .welcome-cover .journal-cover-link {
    min-height: 44px;
    margin: .12rem 0 -.35rem;
    color: #fff0cb;
    font-size: .86rem;
    text-underline-offset: .2em;
  }
  .journal-home .credit-card {
    display: grid;
    position: relative;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-content: start;
    align-items: start;
    gap: .55rem;
    max-width: none;
    min-width: 0;
    padding: .84rem var(--cover-inset);
    border: 1px solid var(--mobile-line);
    border-top: 0;
    border-radius: 0 0 1.2rem 1.2rem;
    background: var(--mobile-paper);
  }
  .journal-home .credit-card:has(.promo-credit:not([hidden])) { grid-template-columns: 1.15fr 1.1fr .85fr; }
  .journal-home .credit-icon { display: none; }
  .journal-home .credit-card div { align-self: stretch; gap: .12rem; }
  .journal-home .credit-card strong { color: var(--mobile-pine); font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; line-height: 1; }
  .journal-home .credit-card span:not(.credit-icon) { color: var(--mobile-ink); font-size: .77rem; font-weight: 700; }
  .journal-home .credit-renewal {
    grid-column: 1 / -1;
    padding-top: .48rem;
    border-top: 1px solid var(--mobile-line);
    color: var(--mobile-muted);
    font-size: .74rem;
    line-height: 1.4;
  }
  .journal-home .paid-credit { margin: 0; padding-left: .78rem; border-left: 1px solid var(--mobile-line); }
  .journal-home .section-heading { align-items: center; margin-bottom: .85rem; }
  .journal-home .section-heading h2,
  .journal-home .field-tools-promo h2 { color: var(--mobile-ink); font-size: clamp(1.72rem, 7.5vw, 2.35rem); line-height: 1.08; letter-spacing: -.035em; }
  .journal-home .section-heading .text-link { min-height: 44px; padding: 0; text-align: right; }
  .journal-home .feature-grid { grid-template-columns: minmax(0, 1fr); gap: .64rem; }
  .journal-home .feature-card {
    --tile-tone: #264c43;
    display: grid;
    position: relative;
    isolation: isolate;
    grid-template-columns: clamp(4.7rem, 21vw, 7.2rem) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: .86rem;
    min-height: 8.3rem;
    padding: .8rem .85rem .6rem 0;
    border: 1px solid var(--mobile-line);
    border-radius: .92rem;
    background: var(--mobile-paper);
    box-shadow: 0 3px 10px rgb(31 57 42 / 4%);
  }
  .journal-feature-cast-lots { --tile-image: url("scenery/cast-lots.webp"); }
  .journal-feature-divine-oracles { --tile-image: url("scenery/divine-oracles.webp"); }
  .journal-feature-inspired-plans { --tile-image: url("scenery/inspired-plans.webp"); }
  .journal-feature-godcache-missions { --tile-image: var(--cover-art); }
  .journal-feature-intercession-room { --tile-image: url("scenery/intercession-room.webp"); }
  .journal-feature-social {
    --tile-image: repeating-radial-gradient(ellipse at 10% 2%, transparent 0 10px, rgb(245 228 173 / 16%) 11px 12px, transparent 13px 21px);
  }
  .journal-home .feature-top {
    grid-column: 1;
    grid-row: 1 / 4;
    align-items: flex-end;
    margin: -.8rem 0 -.6rem;
    padding: .55rem;
    border-radius: .86rem 0 0 .86rem;
    background: linear-gradient(0deg, rgb(14 39 29 / 68%), transparent 58%), var(--tile-image, none) center / cover, var(--tile-tone);
  }
  .journal-home .feature-icon {
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid rgb(255 246 206 / 50%);
    color: #fff5d4;
    background: rgb(21 54 42 / 88%);
    font-size: .95rem;
  }
  .journal-home .feature-card h3 {
    margin: 0 0 .26rem;
    font-family: var(--font-display);
    color: var(--mobile-ink);
    font-size: clamp(1.22rem, 5.75vw, 1.65rem);
    line-height: 1.08;
    letter-spacing: -.03em;
  }
  .journal-home .feature-card > p { margin: 0 0 .46rem; color: var(--mobile-muted); font-size: .845rem; line-height: 1.43; }
  .journal-home .feature-bottom { justify-content: space-between; flex-wrap: wrap; gap: .2rem .55rem; margin: 0; padding: 0; border: 0; }
  .journal-home .metric,
  .journal-home .metric strong { color: var(--mobile-muted); font-size: .75rem; }
  .journal-home .card-link { gap: .25rem; padding: .15rem 0; color: var(--mobile-pine); font-size: .78rem; }
  .journal-home a.card-link::after { position: absolute; inset: 0; content: ""; border-radius: .92rem; }
  .journal-home a.card-link:focus-visible { outline: none; }
  .journal-home a.card-link:focus-visible::after { outline: 3px solid var(--mobile-pine); outline-offset: 2px; }
  .journal-home .card-link-disabled { color: #785f34; white-space: normal; }
  .journal-home .field-tools-promo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .8rem;
    margin: 1.15rem 0 1.9rem;
    padding: 1.2rem;
    border: 1px solid #2c5145;
    border-radius: 1rem;
    background: radial-gradient(ellipse at 100% 0%, rgb(137 150 98 / 24%), transparent 62%), var(--mobile-pine);
  }
  .journal-home .field-tools-promo .eyebrow { margin: 0 0 .6rem; color: #edda9d; }
  .journal-home .field-tools-promo h2 { margin: 0 0 .5rem; color: #fff8e7; }
  .journal-home .field-tools-promo p:not(.eyebrow) { color: #e0e8de; font-size: .87rem; line-height: 1.56; }
  .journal-home .field-tools-promo .button {
    width: auto;
    min-height: 44px;
    border-color: #e4cf99;
    background: #ecdcae;
    color: #173c34;
    font-size: .87rem;
  }
  .journal-home .recent-section { margin-top: 0; }
  .journal-home .empty-state { border-style: solid; border-radius: 1rem; background: var(--mobile-paper); }
  .journal-home .empty-mark { color: var(--mobile-gold); }
  .journal-home .activity-list { overflow: hidden; border-radius: 1rem; background: var(--mobile-paper); }
  .journal-home .activity-item { padding: .92rem 1rem; }
  .journal-home .activity-item :is(span, small):not(.activity-dot) { color: var(--mobile-muted); }
  .journal-home .foundation-banner { order: 1; gap: .68rem; margin: 1.15rem 0 0; padding: .92rem; border-color: var(--mobile-line); border-radius: .85rem; background: #ecf0e6; }
  .journal-home .foundation-banner .eyebrow { color: #546c56; font-size: .66rem; }
  .journal-home .foundation-banner p:last-child { color: #3b584b; font-size: .82rem; line-height: 1.5; }
  .journal-home .foundation-symbol { flex-basis: 31px; width: 31px; height: 31px; color: #46634d; }
}

@media (hover: hover) and (max-width: 599px), (hover: hover) and (max-width: 639px) and (max-height: 799px) {
  .journal-home .feature-active:hover { border-color: #95a88e; box-shadow: 0 5px 14px rgb(31 57 42 / 12%); }
  .journal-home .field-tools-promo .button:hover { background: #faf1d8; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 599px), (prefers-reduced-motion: no-preference) and (max-width: 639px) and (max-height: 799px) {
  .journal-home .feature-active { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
  .journal-home .feature-active:active { transform: scale(.992); }
}
@media (pointer: coarse) and (orientation: landscape) and (min-width: 670px) and (max-height: 500px) {
  .auth-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-entry .auth-cover { min-height: 13.5rem; }
  .auth-entry .scripture-note { grid-column: 1; grid-row: 2; }
  .auth-entry .form-card { grid-column: 2; grid-row: 1 / span 2; }
  .auth-layout > .form-card:only-child { grid-column: 1 / -1; }
  .journal-home .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-cover { min-height: 10rem; }
}
