/* ==========================================================================
   card-desktop-layout.css — Fixed desktop newspaper layout on all viewports
   Card viewer pages only (body.prophet-layout-fixed). Phones pan horizontally.
   ========================================================================== */

body.prophet-layout-fixed {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* After mobile-fit script: full newspaper visible, no sideways pan needed at load */
html.prophet-mobile-fitted body.prophet-layout-fixed {
  overflow-x: hidden;
}

body.prophet-layout-fixed main {
  min-width: 0;
}

/* --- Card shell: full desktop width, no mobile stacking --- */
body.prophet-layout-fixed .prophet-card {
  min-width: 960px;
  max-width: 960px;
  width: 960px;
  margin: 2rem auto;
  padding: 2rem 2.5rem;
  overflow-x: visible;
}

body.prophet-layout-fixed .prophet-name {
  font-size: 2.4rem;
}

body.prophet-layout-fixed .prophet-title {
  font-size: 1.1rem;
}

body.prophet-layout-fixed .prophet-incantation {
  display: block;
}

body.prophet-layout-fixed .prophet-flourish {
  font-size: 1.4rem;
}

body.prophet-layout-fixed .prophet-article-text .prophet-dropcap {
  font-size: 3rem;
}

body.prophet-layout-fixed .prophet-banner .prophet-dropcap {
  font-size: 4.4rem;
}

body.prophet-layout-fixed .prophet-index-item {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

/* Portrait layout — 3-column newspaper (desktop) */
body.prophet-layout-fixed .prophet-newspaper--portrait {
  grid-template-columns: minmax(9rem, 1fr) minmax(200px, auto) minmax(9rem, 1fr);
  grid-template-rows: auto;
  align-items: start;
}

body.prophet-layout-fixed .prophet-newspaper--portrait .prophet-column--left {
  grid-column: 1;
  grid-row: 1;
  order: unset;
  border-right: 1px solid var(--color-divider);
  border-bottom: none;
  padding-right: 0.8rem;
}

body.prophet-layout-fixed .prophet-newspaper--portrait .prophet-column--center {
  grid-column: 2;
  grid-row: 1;
  order: unset;
  min-width: 200px;
  border-bottom: none;
  border-left: 1px solid var(--color-divider);
  border-right: 1px solid var(--color-divider);
  padding: 0 0.8rem;
}

body.prophet-layout-fixed .prophet-newspaper--portrait .prophet-column--right {
  grid-column: 3;
  grid-row: 1;
  order: unset;
  padding-left: 0.8rem;
}

body.prophet-layout-fixed .prophet-card--portrait .prophet-newspaper--portrait .prophet-column--left,
body.prophet-layout-fixed .prophet-card--portrait .prophet-newspaper--portrait .prophet-column--right {
  align-self: start;
}

body.prophet-layout-fixed .prophet-card--portrait .prophet-photo-frame {
  max-width: 200px;
}

/* Wide layout — 2-column hero (Reid Howle style) */
body.prophet-layout-fixed .prophet-newspaper--wide {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
  align-items: start;
  row-gap: 0;
}

body.prophet-layout-fixed .prophet-newspaper--wide .prophet-column--left {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--color-divider);
  align-self: start;
}

body.prophet-layout-fixed .prophet-newspaper--wide .prophet-column--hero-wide {
  grid-column: 2;
  grid-row: 1;
  padding: 0 0 0 0.65rem;
  border-bottom: none;
  align-self: start;
}

body.prophet-layout-fixed .prophet-newspaper--wide .prophet-photo-block {
  width: 100%;
  align-items: stretch;
}

body.prophet-layout-fixed .prophet-newspaper--wide .prophet-hero-below {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
}

body.prophet-layout-fixed .prophet-newspaper--wide .prophet-newspaper__bottom {
  grid-column: 1 / -1;
  grid-row: 2;
}

body.prophet-layout-fixed .prophet-bottom-articles--wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
}

body.prophet-layout-fixed .prophet-card--wide .prophet-photo-frame--wide {
  max-width: 100%;
}

body.prophet-layout-fixed .prophet-card--wide .prophet-photo-frame--wide video.prophet-hero-video {
  min-height: 220px;
}

/* Bottom article row (portrait cards) */
body.prophet-layout-fixed .prophet-bottom-articles:not(.prophet-bottom-articles--wide) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 0.8rem;
}

body.prophet-layout-fixed .prophet-bottom-articles:not(.prophet-bottom-articles--wide) .prophet-article--bottom {
  border-bottom: none;
  border-right: 1px dotted var(--color-divider);
  padding-right: 0.8rem;
}

body.prophet-layout-fixed .prophet-bottom-articles:not(.prophet-bottom-articles--wide) .prophet-article--bottom:last-child {
  border-right: none;
  padding-right: 0;
}

body.prophet-layout-fixed .prophet-contact-item {
  font-size: 0.95rem;
}

/* Share bar — full-width fixed footer on phones (not scaled with paper) */
@media (max-width: 899px) {
  body.prophet-layout-fixed .prophet-share-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    z-index: 100;
    padding: 0.6rem 0.5rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    border-top: 1px double var(--color-parchment-dark);
    box-shadow: 0 -4px 20px rgba(44, 24, 16, 0.18);
    transform: none;
    -webkit-transform: none;
  }

  body.prophet-layout-fixed .prophet-share-bar__btn {
    flex: 1 1 0;
    flex-direction: column;
    min-height: 52px;
    min-width: 0;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.2rem;
  }

  body.prophet-layout-fixed .prophet-share-bar__icon {
    font-size: 1.25rem;
  }

  body.prophet-layout-fixed:has(.prophet-share-bar) main {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  html.prophet-mobile-fitted body.prophet-layout-fixed:has(.prophet-share-bar) main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Share bar — inline below card on desktop */
@media (min-width: 900px) {
  body.prophet-layout-fixed .prophet-share-bar {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0.75rem auto 0;
    border-radius: 8px;
    border: 1px double var(--color-parchment-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  body.prophet-layout-fixed .prophet-share-bar__btn {
    flex-direction: row;
    font-size: 0.72rem;
    gap: 0.35rem;
    min-height: 44px;
  }

  body.prophet-layout-fixed:has(.prophet-share-bar) main {
    padding-bottom: 0;
  }
}

/* Directory index — two columns inside fixed card width */
body.prophet-layout-fixed .prophet-directory-grid {
  grid-template-columns: repeat(2, 1fr);
}
