:root {
  --pm-gold: #9b7536;
  --pm-gold-dark: #5c421d;
  --pm-border: #d5c8b4;
  --pm-bg: #f7f1e7;
  --pm-bg-strong: #eee3d2;
  --pm-card-bg: #fffdf8;
  --pm-shadow-card: 0 20px 54px rgba(48, 35, 17, .13);
  --pm-shadow-card-hover: 0 14px 28px rgba(53, 39, 20, .15);
  --pm-radius: 0;
  --pm-radius-card: 4px;
  --pm-spacing: 1rem;
  --pm-transition: 220ms ease;
  --pm-ink: #15130f;
  --pm-muted: #716a5e;
  --pm-line: var(--pm-border);
  --pm-paper: var(--pm-bg);
  --pm-paper-strong: var(--pm-bg-strong);
  --pm-accent: var(--pm-gold);
  --pm-accent-dark: var(--pm-gold-dark);
  --pm-white: #fff;
  --pm-space-1: .5rem;
  --pm-space-2: 1rem;
  --pm-space-3: 1.5rem;
  --pm-space-4: 2rem;
  --pm-shadow: var(--pm-shadow-card);
  --pm-shadow-hover: var(--pm-shadow-card-hover);
}

/* Review correction: this class is emitted only for Project Mythos Entity
   pages and the managed Explore Mythology hub tree. */
body.pm-project-mythos-no-sidebar #sidebar,
body.pm-project-mythos-no-sidebar .sidebar {
  display: none !important;
}

body.pm-project-mythos-no-sidebar #content-in,
body.pm-project-mythos-no-sidebar .content-in {
  display: block;
}

body.pm-project-mythos-no-sidebar #main,
body.pm-project-mythos-no-sidebar .main {
  width: 100% !important;
  max-width: none;
  margin-inline: auto;
}

/* -------------------------------------------------------------------------
   Release 0.12: complete Entity variations plus Archive/Search presentation.
   These rules intentionally remain scoped to Project Mythos components.
   ------------------------------------------------------------------------- */
.pm-entity-card--character { --pm-entity-accent: #a77b36; --pm-entity-soft: #f4ead8; }
.pm-entity-card--artifact { --pm-entity-accent: #a66d22; --pm-entity-soft: #f5e5c9; }
.pm-entity-card--place { --pm-entity-accent: #72806a; --pm-entity-soft: #e7ebdf; }
.pm-entity-card--event { --pm-entity-accent: #8f5e43; --pm-entity-soft: #efe1d9; }

.pm-entity-card--artifact,
.pm-entity-card--place,
.pm-entity-card--event {
  border-color: color-mix(in srgb, var(--pm-entity-accent) 34%, #d9cbb5);
}

.pm-entity-card--artifact::after,
.pm-entity-card--place::after,
.pm-entity-card--event::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pm-entity-accent), transparent);
  opacity: .72;
  pointer-events: none;
}

.pm-entity-card--artifact .pm-entity-card__hero,
.pm-entity-card--place .pm-entity-card__hero,
.pm-entity-card--event .pm-entity-card__hero {
  grid-template-columns: minmax(0, 52fr) minmax(290px, 48fr);
}

.pm-entity-card--artifact .pm-entity-card__visual,
.pm-entity-card--place .pm-entity-card__visual,
.pm-entity-card--event .pm-entity-card__visual {
  min-height: 430px;
  aspect-ratio: auto;
  background: var(--pm-entity-soft);
}

.pm-entity-card--artifact .pm-entity-card__image,
.pm-entity-card--place .pm-entity-card__image,
.pm-entity-card--event .pm-entity-card__image {
  aspect-ratio: auto;
  object-position: center;
}

.pm-entity-card--artifact .pm-profile-tile__icon,
.pm-entity-card--place .pm-profile-tile__icon,
.pm-entity-card--event .pm-profile-tile__icon,
.pm-entity-card--artifact .pm-section-kicker .pm-icon,
.pm-entity-card--place .pm-section-kicker .pm-icon,
.pm-entity-card--event .pm-section-kicker .pm-icon {
  border-color: color-mix(in srgb, var(--pm-entity-accent) 48%, transparent);
  color: var(--pm-entity-accent);
}

.pm-entity-card--artifact .pm-entity-card__placeholder {
  background: radial-gradient(circle at 58% 34%, rgba(255, 239, 181, .9), transparent 22%), linear-gradient(145deg, #30343a, #8d7048 56%, #171a1e);
  color: #fff2ca;
}

.pm-entity-card--place .pm-entity-card__placeholder {
  background: radial-gradient(circle at 55% 35%, rgba(255, 255, 255, .75), transparent 25%), linear-gradient(145deg, #b8aa8b, #e9eee7 48%, #82939d);
  color: #4f604f;
}

.pm-entity-card--event .pm-entity-card__placeholder {
  background: radial-gradient(circle at 66% 31%, rgba(255, 232, 174, .78), transparent 20%), linear-gradient(145deg, #403630, #9b7045 58%, #2a2422);
  color: #fff0cf;
}

.pm-entity-card--artifact .pm-timeline__item.is-active .pm-timeline__marker,
.pm-entity-card--place .pm-timeline__item.is-active .pm-timeline__marker,
.pm-entity-card--event .pm-timeline__item.is-active .pm-timeline__marker {
  border-color: var(--pm-entity-accent);
  background: var(--pm-entity-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--pm-entity-accent) 16%, transparent);
}

/* Archive and search cards inherit the active WordPress theme structure. */
body.pm-entity-listing .pm-entry-card--entity,
body.pm-entity-listing .pm-entry-card--entity .entry-card,
body.pm-entity-listing .pm-entry-card--entity.entry-card-wrap {
  overflow: hidden;
  border: 1px solid var(--pm-border, #d9cdbb);
  border-radius: var(--pm-radius-card, 5px);
  background: #fffdf8;
  box-shadow: 0 10px 26px rgba(54, 39, 18, .08);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

body.pm-entity-listing .pm-entry-card--entity:hover,
body.pm-entity-listing .pm-entry-card--entity:hover .entry-card {
  border-color: #b89053;
  box-shadow: 0 16px 34px rgba(54, 39, 18, .13);
  transform: translateY(-2px);
}

.pm-listing-media {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #eadfce, #f9f4e9 55%, #c9b28c);
}

.pm-listing-media > img,
.pm-listing-media > picture,
.pm-listing-media > picture > img,
.pm-listing-media > .pm-external-portrait-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 24%;
  transition: transform 220ms ease;
}

body.pm-entity-listing .entry-card-thumb .pm-listing-media,
body.pm-entity-listing .entry-card-thumb .pm-listing-media > img,
body.pm-entity-listing .entry-card-thumb .pm-listing-media > picture,
body.pm-entity-listing .entry-card-thumb .pm-listing-media > picture > img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.pm-entry-card--entity:hover .pm-listing-media > img,
.pm-entry-card--entity:hover .pm-listing-media > picture > img {
  transform: scale(1.015);
}

.pm-listing-media--artifact { background: linear-gradient(145deg, #32363b, #846c4c 58%, #181b1f); }
.pm-listing-media--place { background: linear-gradient(145deg, #c1b493, #edf0e8 52%, #91a0a8); }
.pm-listing-media--event { background: linear-gradient(145deg, #4c3e36, #986f47 58%, #2c2623); }

.pm-listing-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #8f672e;
}

.pm-listing-placeholder__icon {
  display: grid;
  width: 4.75rem;
  height: 4.75rem;
  place-items: center;
  border: 1px solid rgba(255, 250, 234, .72);
  border-radius: 50%;
  background: rgba(255, 253, 246, .2);
  box-shadow: 0 0 0 9px rgba(255, 253, 246, .08);
}

.pm-listing-placeholder__icon .pm-icon { width: 2.35rem; height: 2.35rem; }
.pm-listing-media--artifact .pm-listing-placeholder,
.pm-listing-media--event .pm-listing-placeholder { color: #fff0cc; }
.pm-listing-media--place .pm-listing-placeholder { color: #52634f; }

.pm-listing-media__badge {
  position: absolute;
  right: .72rem;
  bottom: .7rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  max-width: calc(100% - 1.4rem);
  padding: .38rem .56rem;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 999px;
  background: rgba(38, 30, 21, .72);
  color: #fff8e8;
  font: 750 .56rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
}

.pm-listing-media__badge > span:first-child { display: inline-flex; }
.pm-listing-media__badge .pm-icon { width: .9rem; height: .9rem; }

body.pm-entity-listing .pm-entry-card--entity .entry-card-title,
body.pm-entity-listing .pm-entry-card--entity .entry-card-title a {
  color: #2b2116;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.18;
}

body.pm-entity-listing .pm-entry-card--entity .entry-card-snippet,
body.pm-entity-listing .pm-entry-card--entity .entry-card-description {
  color: #6f6557;
  line-height: 1.58;
}

@media (max-width: 680px) {
  .pm-entity-card--artifact .pm-entity-card__hero,
  .pm-entity-card--place .pm-entity-card__hero,
  .pm-entity-card--event .pm-entity-card__hero { grid-template-columns: 1fr; }

  .pm-entity-card--artifact .pm-entity-card__visual,
  .pm-entity-card--place .pm-entity-card__visual,
  .pm-entity-card--event .pm-entity-card__visual {
    order: -1;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .pm-entity-card--artifact .pm-entity-card__image,
  .pm-entity-card--place .pm-entity-card__image,
  .pm-entity-card--event .pm-entity-card__image { aspect-ratio: 16 / 10; }
}

@media (max-width: 540px) {
  .pm-listing-media__badge { right: .48rem; bottom: .48rem; padding: .32rem .46rem; font-size: .5rem; }
  .pm-listing-placeholder__icon { width: 3.8rem; height: 3.8rem; }
  .pm-listing-placeholder__icon .pm-icon { width: 1.9rem; height: 1.9rem; }
}

/* Event variation: two-column facts, data-driven sequence, and named Hero fallback. */
.pm-entity-card--event .pm-entity-card__profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pm-entity-card--event .pm-profile-tile,
.pm-entity-card--event .pm-profile-tile:nth-child(3n) {
  min-height: 94px;
  border-right: 1px solid #ebe3d7;
  border-bottom: 1px solid #ebe3d7;
}
.pm-entity-card--event .pm-profile-tile:nth-child(2n) { border-right: 0; }
.pm-entity-card--event .pm-profile-tile:nth-last-child(-n + 2) { border-bottom: 0; }
.pm-entity-card--event .pm-profile-tile__value {
  line-height: 1.42;
  overflow-wrap: break-word;
  word-break: normal;
}
.pm-context-line--sequence .pm-timeline__item {
  color: #4d3516;
  font-weight: 700;
}
.pm-context-line--sequence .pm-timeline__marker {
  border-color: var(--pm-accent);
  background: #fffaf1;
  box-shadow: 0 0 0 4px rgba(155, 117, 54, .1);
}
.pm-timeline__text {
  display: block;
  margin-top: .35rem;
  color: var(--pm-muted);
  font-size: .62rem;
  font-weight: 400;
  line-height: 1.4;
}
.pm-entity-card__placeholder-name {
  max-width: 88%;
  color: currentColor;
  font: 400 clamp(1.55rem, 4vw, 2.45rem)/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: -.02em;
  text-align: center;
  text-transform: none;
}
.pm-entity-card__placeholder-type { opacity: .82; }

@media (max-width: 620px) {
  .pm-entity-card--event .pm-entity-card__profile { grid-template-columns: minmax(0, 1fr); }
  .pm-entity-card--event .pm-profile-tile,
  .pm-entity-card--event .pm-profile-tile:nth-child(2n),
  .pm-entity-card--event .pm-profile-tile:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid #ebe3d7;
  }
  .pm-entity-card--event .pm-profile-tile:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body.pm-entity-listing .pm-entry-card--entity,
  body.pm-entity-listing .pm-entry-card--entity .entry-card,
  .pm-listing-media > img,
  .pm-listing-media > picture > img { transition: none; }
  body.pm-entity-listing .pm-entry-card--entity:hover,
  body.pm-entity-listing .pm-entry-card--entity:hover .entry-card,
  .pm-entry-card--entity:hover .pm-listing-media > img,
  .pm-entry-card--entity:hover .pm-listing-media > picture > img { transform: none; }
}

.pm-entry-components,
.pm-entry-components *,
.pm-entry-components *::before,
.pm-entry-components *::after {
  box-sizing: border-box;
}

.pm-entry-components {
  width: 100%;
  max-width: 100%;
  margin: 0 0 3rem;
  color: var(--pm-ink);
}

.pm-entry-components--after { margin: 3rem 0 0; }
.pm-icon { width: 1.15rem; height: 1.15rem; display: block; flex: 0 0 auto; overflow: visible; fill: none !important; stroke: currentColor !important; }
.pm-focused-hero-image { object-fit: cover; }
.pm-icon path,
.pm-icon circle,
.pm-icon line,
.pm-icon polyline,
.pm-icon polygon { vector-effect: non-scaling-stroke; }
.pm-icon .pm-icon__fill { fill: currentColor !important; stroke: none !important; }

.pm-myth-card,
.pm-entity-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius);
  background: linear-gradient(135deg, #fffdf8, var(--pm-paper));
  box-shadow: var(--pm-shadow);
}

.pm-myth-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 4;
  border: 1px solid rgba(155, 117, 54, .21);
  pointer-events: none;
}

.pm-myth-card__hero,
.pm-entity-card__hero {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(300px, 45fr);
  min-height: 430px;
  border-bottom: 1px solid var(--pm-line);
}

.pm-myth-card__header,
.pm-entity-card__header {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.4rem, 5.2vw, 4.6rem);
}

.pm-myth-card__eyebrow,
.pm-section-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .8rem;
  color: var(--pm-accent-dark);
  font: 700 .68rem/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.pm-myth-card__eyebrow span + span::before {
  content: "•";
  margin-right: .8rem;
  color: var(--pm-accent);
}

.pm-myth-card__name,
.pm-entity-card__name {
  overflow-wrap: anywhere;
  margin: .68rem 0 .3rem;
  font: 400 clamp(3.55rem, 7.35vw, 6.5rem)/.95 Georgia, "Times New Roman", serif;
  letter-spacing: -.05em;
}

/* Mythology hub directories. */
.pm-directory {
  --pm-directory-ink: #29231d;
  --pm-directory-muted: #6e6255;
  --pm-directory-border: #e6ddcf;
  display: grid;
  gap: 2.25rem;
  margin: 1.75rem 0 2.5rem;
}
.pm-directory-group {
  padding: clamp(1rem, 2.6vw, 1.6rem);
  border: 1px solid var(--pm-directory-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdfa, #f8f2e9);
  box-shadow: 0 14px 34px rgba(43, 34, 24, .07);
}
.pm-directory-group__header {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.2rem;
  padding-bottom: .95rem;
  border-bottom: 1px solid rgba(155, 117, 54, .22);
}
.pm-directory-group__header > div { flex: 1 1 auto; min-width: 0; }
body.pm-project-mythos-hub .article .pm-directory-group__header h2,
body.pm-project-mythos-hub .entry-content .pm-directory-group__header h2,
.pm-directory-group__header h2 {
  margin: 0 0 .2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--pm-directory-ink);
  font: 600 clamp(1.45rem, 3vw, 2rem)/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: -.02em;
}
body.pm-project-mythos-hub .pm-directory-group__header h2::before,
body.pm-project-mythos-hub .pm-directory-group__header h2::after { content: none; }
.pm-directory-group__header p { margin: 0; color: var(--pm-directory-muted); }

body.pm-project-mythos-hub .article .entry-content > h2,
body.pm-project-mythos-hub .entry-content > h2 {
  margin: 2rem 0 .9rem;
  padding: .7rem .95rem .68rem 1.05rem;
  border: 0;
  border-left: 3px solid var(--pm-gold);
  border-bottom: 1px solid rgba(155, 117, 54, .24);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(247, 241, 231, .9), rgba(255, 253, 248, .2));
  box-shadow: none;
  color: #2e251a;
  font: 600 clamp(1.35rem, 2.6vw, 1.7rem)/1.25 Georgia, "Times New Roman", serif;
  letter-spacing: -.015em;
}
body.pm-project-mythos-hub .entry-content > h2::before,
body.pm-project-mythos-hub .entry-content > h2::after { content: none; }
.pm-directory-group__icon {
  display: grid;
  place-items: center;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: #fff;
  background: #58452f;
}
.pm-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.pm-directory-card {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--pm-directory-border);
  border-radius: 14px;
  color: var(--pm-directory-ink);
  background: #fff;
  text-decoration: none !important;
  box-shadow: 0 7px 20px rgba(43, 34, 24, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pm-directory-card:hover,
.pm-directory-card:focus-visible {
  color: var(--pm-directory-ink);
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(43, 34, 24, .12);
}
.pm-directory-card__visual {
  display: grid;
  place-items: center;
  min-height: 190px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #746044, #2f2923);
}
.pm-directory-card__visual img { width: 100%; height: 100%; object-fit: cover; }
.pm-directory-card__emblem .pm-icon { width: 3.25rem; height: 3.25rem; }
.pm-directory-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1rem;
}
.pm-directory-card__type {
  color: #80683f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.pm-directory-card__name {
  margin: .25rem 0 .45rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.12;
}
.pm-directory-card__summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--pm-directory-muted);
  font-size: .86rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.pm-directory-card__action {
  margin-top: auto;
  padding-top: .65rem;
  color: #6f542b;
  font-size: .82rem;
  font-weight: 750;
}
.pm-directory-card__action span { margin-left: .25rem; }
.pm-directory-empty { margin: 0; color: var(--pm-directory-muted); font-style: italic; }

@media (max-width: 820px) {
  .pm-directory-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .pm-directory-card { grid-template-columns: 104px minmax(0, 1fr); min-height: 154px; }
  .pm-directory-card__visual { min-height: 154px; }
  .pm-directory-card__body { padding: .8rem; }
  .pm-directory-card__summary { -webkit-line-clamp: 3; }
}

.pm-myth-card__tagline,
.pm-entity-card__tagline {
  max-width: 650px;
  margin: .95rem 0 1.65rem;
  color: #3a3125;
  font: 400 clamp(1.1rem, 2.3vw, 1.55rem)/1.45 Georgia, "Times New Roman", serif;
}

.pm-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-chip-list li {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  max-width: 100%;
  padding: .45rem .72rem;
  border: 1px solid rgba(155, 117, 54, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #49351c;
  font: 700 .68rem/1.25 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.pm-chip-list .pm-icon { width: .84rem; height: .84rem; color: var(--pm-accent-dark); }

.pm-myth-card__portrait,
.pm-entity-card__visual {
  position: relative;
  min-width: 0;
  min-height: 430px;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  background: #d9d1c4;
}

.pm-myth-card__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 253, 248, .72) 0, rgba(255, 253, 248, .12) 24%, transparent 42%), linear-gradient(0deg, rgba(21, 19, 15, .12), transparent 44%);
  pointer-events: none;
}

.pm-entity-card__image,
.pm-myth-card__portrait > img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(.82) contrast(.98) brightness(1.01);
}

.pm-entity-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 430px;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  background: radial-gradient(circle at 55% 38%, rgba(255, 247, 218, .82), transparent 25%), linear-gradient(145deg, #d7c7a7, #f4eee2 48%, #9d8762);
  color: var(--pm-accent-dark);
  font: 800 .65rem/1.2 system-ui, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pm-entity-card--artifact .pm-entity-card__placeholder { background: radial-gradient(circle at 50% 42%, rgba(255, 245, 190, .88), transparent 19%), linear-gradient(135deg, #30343a, #806a49 58%, #181b20); color: #fff8e8; }
.pm-entity-card--place .pm-entity-card__placeholder { background: linear-gradient(155deg, rgba(255, 255, 255, .5), transparent 40%), linear-gradient(135deg, #c9b793, #edf0e8 48%, #91a4b0); }
.pm-entity-card--event .pm-entity-card__placeholder { background: radial-gradient(circle at 68% 30%, rgba(255, 237, 190, .7), transparent 19%), linear-gradient(135deg, #51433b, #9c7445 62%, #302824); color: #fff8e8; }
.pm-entity-card__placeholder .pm-icon { width: clamp(4rem, 10vw, 7rem); height: clamp(4rem, 10vw, 7rem); }

.pm-myth-card__profile,
.pm-entity-card__profile {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--pm-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(250, 246, 238, .86));
}

.pm-profile-tile {
  position: relative;
  min-width: 0;
  min-height: 126px;
  padding: 1.45rem 1.1rem 1.25rem 3.65rem;
  border-right: 1px solid #ebe3d7;
  border-bottom: 1px solid #ebe3d7;
}

.pm-profile-tile:nth-child(3n) { border-right: 0; }
.pm-profile-tile:nth-last-child(-n + 3) { border-bottom: 0; }

.pm-profile-tile__icon,
.pm-journey-group__mark {
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 117, 54, .46);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--pm-accent-dark);
  box-shadow: inset 0 0 0 3px rgba(155, 117, 54, .06);
}

.pm-profile-tile__icon {
  position: absolute;
  top: 1.35rem;
  left: 1.08rem;
  width: 1.9rem;
  height: 1.9rem;
}

.pm-profile-tile__icon .pm-icon { width: 1rem; height: 1rem; }
.pm-profile-tile__label { display: block; margin-bottom: .52rem; color: var(--pm-muted); font: 700 .58rem/1.3 system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.pm-profile-tile__value { display: block; overflow-wrap: anywhere; color: #241c12; font: 400 1.16rem/1.34 Georgia, "Times New Roman", serif; }

.pm-timeline,
.pm-context-line {
  position: relative;
  padding: 1.75rem clamp(1.7rem, 4.2vw, 3.25rem) 2rem;
  background: linear-gradient(180deg, #f8f1e5, #f3eadc);
}

.pm-timeline__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.pm-timeline__item { position: relative; min-width: 0; padding: 1.5rem .3rem 0; color: #81796d; font: 400 .69rem/1.35 system-ui, sans-serif; letter-spacing: .03em; text-align: center; overflow-wrap: anywhere; }
.pm-timeline__item::before { content: ""; position: absolute; top: 7px; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, #d9cfbd, #b99b67, #d9cfbd); }
.pm-timeline__marker { position: absolute; top: 2px; left: 50%; width: 12px; height: 12px; border: 2px solid var(--pm-line); border-radius: 50%; background: #f6eee2; transform: translateX(-50%); }
.pm-timeline__item.is-active { color: #4d3516; font-weight: 800; }
.pm-timeline__item.is-active .pm-timeline__marker { top: -2px; width: 19px; height: 19px; border-color: var(--pm-accent); background: var(--pm-accent); box-shadow: 0 0 0 7px rgba(155, 117, 54, .14), 0 3px 10px rgba(92, 66, 29, .18); }

.pm-myth-card__summary {
  position: relative;
  padding: 1.8rem clamp(1.8rem, 4.5vw, 3.35rem) 2.15rem;
  border-top: 1px solid rgba(155, 117, 54, .16);
  background: linear-gradient(135deg, #fffdf8, #f8f0e2);
}

.pm-myth-card__summary::before { content: "“"; position: absolute; top: .35rem; right: 2.2rem; color: rgba(155, 117, 54, .12); font: 5.5rem/1 Georgia, serif; }
.pm-myth-card__summary p { position: relative; max-width: 920px; margin: .85rem 0 0; color: #33291d; font: 400 1.08rem/1.85 Georgia, "Times New Roman", serif; }
.pm-section-kicker .pm-icon { width: .95rem; height: .95rem; }

.pm-panel { width: 100%; max-width: 100%; padding: clamp(1.4rem, 3vw, 2.1rem); border: 1px solid var(--pm-line); background: linear-gradient(180deg, #fff, var(--pm-paper)); }
.pm-trivia ol { margin: 1rem 0 0; }

.pm-journey { width: 100%; max-width: 100%; margin-top: 2rem; overflow: hidden; border: 1px solid #d6c8b2; background: var(--pm-paper); box-shadow: 0 18px 45px rgba(48, 35, 17, .1); }
.pm-journey__header { position: relative; padding: clamp(1.8rem, 4.5vw, 3.1rem); border-bottom: 1px solid #d9ccb7; background: radial-gradient(circle at 50% -20%, rgba(185, 145, 73, .22), transparent 44%), linear-gradient(180deg, #fffdf9, #f4eadc); text-align: center; }
.pm-journey__header::after { content: ""; display: block; width: 84px; height: 1px; margin: 1.25rem auto 0; background: linear-gradient(90deg, transparent, #a77f3f, transparent); }
.pm-journey__overline { color: #8b642c; font: 800 .65rem/1.25 system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.pm-journey__title { overflow-wrap: anywhere; margin: .65rem 0 0; color: #241c12; font: 400 clamp(1.8rem, 4vw, 3rem)/1.15 Georgia, "Times New Roman", serif; }
.pm-journey__header p { max-width: 690px; margin: .8rem auto 0; color: #706657; font-size: .92rem; line-height: 1.62; }
.pm-journey__groups { padding: clamp(.9rem, 2.5vw, 1.6rem); }
.pm-journey-group { padding: clamp(.9rem, 2.2vw, 1.45rem); border-bottom: 1px solid #dfd3c1; }
.pm-journey-group:last-child { border-bottom: 0; }
.pm-journey-group__heading { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .85rem; }
.pm-journey-group__mark { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; }
.pm-journey-group__mark .pm-icon { width: 1.08rem; height: 1.08rem; }
.pm-journey-group__title { color: #2a2117; font: 400 1.3rem/1.18 Georgia, "Times New Roman", serif; }
.pm-journey-group__heading p { margin: .22rem 0 0; color: #817665; font-size: .75rem; line-height: 1.42; }
.pm-journey-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.pm-journey-card { position: relative; display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid #d7c9b3; border-radius: var(--pm-radius-card); background: #fff; color: #282015 !important; text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pm-journey-card:hover { border-color: #a97d39; box-shadow: var(--pm-shadow-hover); transform: translateY(-4px); }
.pm-journey-card__visual { position: relative; display: block; height: 140px; overflow: hidden; background: #ded4c4; }
.pm-journey-card__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(28, 22, 14, .25), transparent 52%); pointer-events: none; }
.pm-journey-card__visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 19%; filter: saturate(.83) contrast(.97); transition: transform .2s ease; }
.pm-journey-card:hover .pm-journey-card__visual img { transform: scale(1.015); }
.pm-journey-card__visual--events { background: radial-gradient(circle at 68% 30%, rgba(255, 237, 190, .7), transparent 19%), linear-gradient(135deg, #51433b, #9c7445 62%, #302824); }
.pm-journey-card__visual--places { background: linear-gradient(155deg, rgba(255, 255, 255, .42), transparent 40%), linear-gradient(135deg, #c9b793, #eef0e7 48%, #9eacb6); }
.pm-journey-card__visual--artifacts { background: radial-gradient(circle at 50% 45%, rgba(255, 245, 190, .9), transparent 18%), linear-gradient(135deg, #2c3138, #7d694a 58%, #171a1e); }
.pm-journey-card__emblem { position: absolute; top: 48%; left: 50%; z-index: 1; display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid rgba(255, 255, 255, .68); border-radius: 50%; background: rgba(33, 27, 20, .2); color: #fff7df; box-shadow: 0 0 0 8px rgba(255, 255, 255, .08); transform: translate(-50%, -50%); }
.pm-journey-card__emblem .pm-icon { width: 2rem; height: 2rem; }
.pm-journey-card__visual-label { position: absolute; bottom: .65rem; left: .85rem; z-index: 1; color: #fff; font: 800 .56rem/1.2 system-ui, sans-serif; letter-spacing: .15em; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); text-transform: uppercase; }
.pm-journey-card__body { display: flex; min-width: 0; flex: 1; flex-direction: column; padding: .88rem .9rem .95rem; }
.pm-journey-card__category { color: #936b31; font: 800 .54rem/1.2 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.pm-journey-card__name { overflow-wrap: anywhere; margin: .3rem 0 .2rem; color: #241c12; font: 400 1.28rem/1.12 Georgia, "Times New Roman", serif; }
.pm-journey-card__relation { min-height: 2.45em; color: #766b5b; font-size: .71rem; line-height: 1.36; }
.pm-journey-card__action { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .68rem; border-top: 1px solid #eee5d8; color: #7b5725; font: 800 .62rem/1.25 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.pm-journey-card__action span { font-size: 1rem; transition: transform .2s ease; }
.pm-journey-card:hover .pm-journey-card__action span { transform: translateX(4px); }
.pm-journey-card.is-upcoming { opacity: .78; }
.pm-journey-card.is-upcoming .pm-journey-card__action { color: #918675; }

@media (max-width: 900px) {
  .pm-myth-card__hero { grid-template-columns: minmax(0, 1fr) minmax(260px, .82fr); }
  .pm-journey-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .pm-myth-card__hero { grid-template-columns: 1fr; min-height: 0; }
  .pm-myth-card__portrait { order: -1; min-height: 360px; aspect-ratio: 16 / 11; }
  .pm-myth-card__portrait::after { background: linear-gradient(0deg, rgba(255, 253, 248, .45), transparent 40%); }
  .pm-entity-card__image, .pm-myth-card__portrait > img { aspect-ratio: 16 / 11; }
  .pm-entity-card__placeholder { min-height: 360px; }
  .pm-myth-card__header { padding: 2rem 1.6rem 2.2rem; }
  .pm-myth-card__profile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-profile-tile:nth-child(3n) { border-right: 1px solid #ebe3d7; }
  .pm-profile-tile:nth-child(2n) { border-right: 0; }
  .pm-profile-tile:nth-last-child(-n + 3) { border-bottom: 1px solid #ebe3d7; }
  .pm-profile-tile:nth-last-child(-n + 2) { border-bottom: 0; }
  .pm-myth-card__name { font-size: clamp(3rem, 15vw, 4.8rem); }
}

@media (max-width: 540px) {
  .pm-entry-components { margin-bottom: 2.2rem; }
  .pm-myth-card::before { inset: 6px; }
  .pm-myth-card__portrait { min-height: 290px; aspect-ratio: 4 / 3; }
  .pm-entity-card__image, .pm-myth-card__portrait > img { aspect-ratio: 4 / 3; }
  .pm-entity-card__placeholder { min-height: 290px; }
  .pm-myth-card__profile { grid-template-columns: 1fr; }
  .pm-profile-tile, .pm-profile-tile:nth-child(n) { min-height: 105px; border-right: 0; border-bottom: 1px solid #ebe3d7; }
  .pm-profile-tile:last-child { border-bottom: 0; }
  .pm-profile-tile__value { font-size: 1.08rem; }
  .pm-timeline { padding: 1.4rem 1.1rem 1.55rem; }
  .pm-timeline__list { grid-template-columns: 1fr; gap: 0; margin-top: .8rem; }
  .pm-timeline__item { min-height: 44px; padding: .65rem .3rem .65rem 2.25rem; text-align: left; }
  .pm-timeline__item::before { top: 0; bottom: 0; left: .58rem; width: 2px; height: auto; background: linear-gradient(#d9cfbd, #b99b67, #d9cfbd); }
  .pm-timeline__marker { top: 50%; left: .64rem; transform: translate(-50%, -50%); }
  .pm-timeline__item.is-active .pm-timeline__marker { top: 50%; transform: translate(-50%, -50%); }
  .pm-myth-card__summary { padding: 1.5rem 1.25rem 1.65rem; }
  .pm-myth-card__summary::before { right: .8rem; }
  .pm-myth-card__summary p { font-size: 1rem; }
  .pm-journey__groups { padding: .55rem; }
  .pm-journey-group { padding: 1rem .55rem; }
  .pm-journey-card-grid { grid-template-columns: 1fr; }
  .pm-journey-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .pm-journey-card__visual { height: 100%; min-height: 138px; }
  .pm-journey-card__body { padding: .82rem; }
  .pm-journey-card__name { font-size: 1.18rem; }
  .pm-journey-card__emblem { width: 54px; height: 54px; }
}

/* Shared Portrait fallback for archive, search, related, and theme cards. */
.pm-external-portrait-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 96px;
  aspect-ratio: 4 / 5;
  place-content: center;
  justify-items: center;
  gap: .45rem;
  overflow: hidden;
  border: 1px solid rgba(155, 117, 54, .28);
  background: radial-gradient(circle at 50% 38%, #fffdf6 0 17%, transparent 18%), linear-gradient(145deg, #f1e7d6, #d8c29b);
  color: var(--pm-gold-dark);
  font: 700 .52rem/1.2 system-ui, sans-serif;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.pm-external-portrait-placeholder__icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid rgba(155, 117, 54, .5);
  border-radius: 50%;
  background: rgba(255, 253, 247, .68);
  color: var(--pm-gold);
}

.pm-external-portrait-placeholder__icon svg { width: 1.45rem; height: 1.45rem; }

@media (prefers-reduced-motion: reduce) {
  .pm-entry-components *,
  .pm-entry-components *::before,
  .pm-entry-components *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .pm-journey-card:hover { transform: none; }
  .pm-journey-card:hover .pm-journey-card__visual img { transform: none; }
}

/* Cocoon: keep the featured image as Entity artwork, but suppress the theme's
   duplicate full-width eye catch above the Project Mythos card. */
body.pm-entity-page .eye-catch-wrap,
body.pm-entity-page .eye-catch {
  display: none !important;
}

/* Journey layout contract: character collection followed by compact horizontal
   Event, Place, and Artifact paths. */
.pm-journey-group--characters {
  display: block;
}

.pm-journey-group--characters .pm-journey-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: start;
}

.pm-journey-group--characters .pm-journey-card {
  min-height: 0;
  height: auto !important;
}

.pm-journey-group--characters .pm-journey-card__visual {
  height: 150px;
}

.pm-journey-group:not(.pm-journey-group--characters) {
  display: grid;
  grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.9rem, 2.5vw, 1.6rem);
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-group__heading {
  margin: 0;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card-grid {
  grid-template-columns: 1fr;
  min-width: 0;
  margin: 0;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
  display: grid;
  grid-template-columns: minmax(130px, 36%) minmax(0, 1fr);
  min-height: 126px;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__visual {
  width: 100%;
  height: 100%;
  min-height: 126px;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__relation {
  min-height: 0;
}

@media (max-width: 850px) {
  .pm-journey-group--characters .pm-journey-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-journey-group:not(.pm-journey-group--characters) {
    grid-template-columns: minmax(150px, .36fr) minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .pm-journey__header {
    padding: 1.55rem 1.2rem;
    text-align: left;
  }

  .pm-journey__header::after {
    margin-right: 0;
    margin-left: 0;
  }

  .pm-journey__groups {
    padding: .55rem;
  }

  .pm-journey-group,
  .pm-journey-group:not(.pm-journey-group--characters) {
    display: block;
    padding: 1rem .55rem;
  }

  .pm-journey-group__heading {
    margin-bottom: .8rem !important;
  }

  .pm-journey-group--characters .pm-journey-card-grid,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: .7rem;
  }

  .pm-journey-group--characters .pm-journey-card,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    width: 100%;
    min-height: 132px;
    height: auto;
  }

  .pm-journey-group--characters .pm-journey-card__visual,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__visual {
    width: 100%;
    height: 100%;
    min-height: 132px;
  }

  .pm-journey-card__body {
    min-width: 0;
    padding: .82rem .78rem;
  }

  .pm-journey-card__relation {
    min-height: 0;
  }

  .pm-journey-card__action {
    padding-top: .58rem;
  }
}

@media (max-width: 380px) {
  .pm-journey-group--characters .pm-journey-card,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .pm-journey-card__name {
    font-size: 1.08rem;
  }

  .pm-journey-card__relation {
    font-size: .68rem;
  }
}

/* Character stabilization: responsive names, compact profile rhythm, and
   equal-height Journey cards. These final overrides intentionally sit after
   the legacy v0.7-compatible rules. */
.pm-myth-card__hero,
.pm-entity-card__hero {
  grid-template-columns: minmax(0, 58fr) minmax(280px, 42fr);
}

.pm-myth-card__name,
.pm-entity-card__name {
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}

.pm-entity-card__name--short { font-size: clamp(3.75rem, 7.1vw, 6.5rem); }
.pm-entity-card__name--medium { font-size: clamp(3.15rem, 5.8vw, 5rem); letter-spacing: -.045em; }
.pm-entity-card__name--long { font-size: clamp(2.72rem, 5vw, 4.25rem); letter-spacing: -.04em; }

.pm-profile-tile {
  grid-template-columns: 2.5rem minmax(106px, .82fr) minmax(0, 1.18fr);
  min-height: 84px;
  padding: .72rem .9rem;
}

.pm-profile-tile__label { color: #9b8564; font-weight: 600; }
.pm-profile-tile__value { color: #241c12; font-weight: 650; overflow-wrap: break-word; }

.pm-entity-card__placeholder {
  position: relative;
  isolation: isolate;
  background: radial-gradient(circle at 50% 37%, rgba(255, 252, 239, .98) 0 14%, transparent 36%), linear-gradient(145deg, #e4d7bf, #fbf7ed 51%, #c8ad7e);
  color: var(--pm-gold-dark);
}

.pm-entity-card__placeholder::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: clamp(7.5rem, 38%, 11rem);
  aspect-ratio: 1;
  border: 1px solid rgba(155, 117, 54, .52);
  border-radius: 50%;
  background: rgba(255, 253, 247, .54);
  box-shadow: inset 0 0 0 8px rgba(155, 117, 54, .055), 0 12px 32px rgba(80, 57, 24, .1);
}

.pm-entity-card__placeholder > span {
  position: relative;
  z-index: 1;
}

.pm-entity-card__placeholder .pm-icon {
  width: clamp(3.7rem, 9vw, 5.7rem);
  height: clamp(3.7rem, 9vw, 5.7rem);
}

.pm-journey-group--characters .pm-journey-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.pm-journey-group--characters .pm-journey-card {
  display: flex;
  min-width: 0;
  height: 100% !important;
  flex-direction: column;
}

.pm-journey-group--characters .pm-journey-card__visual {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.pm-journey-group--characters .pm-journey-card__body {
  min-height: 154px;
  padding: .72rem .75rem .68rem;
}

.pm-journey-group--characters .pm-journey-card__name { margin: .28rem 0 .2rem; line-height: 1.12; }
.pm-journey-group--characters .pm-journey-card__relation { min-height: 2.35em; line-height: 1.28; }

/* Cocoon related cards: quiet Project Mythos placeholder, entity pages only. */
body.pm-entity-page .related-entry-card-thumb:has(img[src*="no-image"]),
body.pm-entity-page .card-thumb:has(img[src*="no-image"]),
body.pm-entity-page .related-entry-card-thumb.no-image,
body.pm-entity-page .card-thumb.no-image {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #fffdf6 0 17%, transparent 18%), linear-gradient(145deg, #efe4d2, #d7c29d);
  color: transparent;
}

body.pm-entity-page .related-entry-card-thumb img[src*="no-image"],
body.pm-entity-page .card-thumb img[src*="no-image"] { opacity: 0; }

body.pm-entity-page .related-entry-card-thumb:has(img[src*="no-image"])::after,
body.pm-entity-page .card-thumb:has(img[src*="no-image"])::after,
body.pm-entity-page .related-entry-card-thumb.no-image::after,
body.pm-entity-page .card-thumb.no-image::after {
  content: "\2726";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(155, 117, 54, .5);
  border-radius: 50%;
  color: var(--pm-gold);
  font: 400 1.15rem/2.25rem Georgia, serif;
  text-align: center;
  transform: translate(-50%, -50%);
}

@media (max-width: 900px) {
  .pm-journey-group--characters .pm-journey-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .pm-myth-card__hero, .pm-entity-card__hero { grid-template-columns: 1fr; }
  .pm-entity-card__name--short { font-size: clamp(3.35rem, 14vw, 5rem); }
  .pm-entity-card__name--medium { font-size: clamp(3rem, 12vw, 4.35rem); }
  .pm-entity-card__name--long { font-size: clamp(2.55rem, 10.5vw, 3.85rem); }
}

@media (max-width: 540px) {
  .pm-profile-tile {
    grid-template-columns: 2.25rem minmax(88px, .78fr) minmax(0, 1.22fr);
    min-height: 78px;
    padding: .64rem .7rem;
  }

  .pm-journey-group--characters .pm-journey-card-grid { grid-template-columns: minmax(0, 1fr); }

  .pm-journey-group--characters .pm-journey-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 128px;
    height: auto !important;
  }

  .pm-journey-group--characters .pm-journey-card__visual {
    min-height: 128px;
    height: 100%;
    aspect-ratio: auto;
  }

  .pm-journey-group--characters .pm-journey-card__body { min-height: 0; padding: .68rem .72rem .64rem; }
  .pm-journey-group--characters .pm-journey-card__relation { min-height: 0; }
}

/* Pack 07 publication review: full-width prose and Project Mythos-local explorer. */
body.pm-entity-page .pm-entity-article-body p {
  width: 100%;
  max-width: none;
  margin: 0 0 1.22rem;
}

.pm-mythos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  align-items: start;
}

.pm-mythos-layout__content { min-width: 0; }

.pm-explorer-nav {
  position: sticky;
  top: 2rem;
  min-width: 0;
  color: #34291d;
}

.pm-explorer-nav__disclosure {
  overflow: hidden;
  border: 1px solid rgba(155, 117, 54, .28);
  border-radius: 16px;
  background: linear-gradient(150deg, #fffdfa, #f7efe3);
  box-shadow: 0 12px 30px rgba(43, 34, 24, .08);
}

.pm-explorer-nav__disclosure > summary {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .9rem 1rem;
  color: #3b2d1c;
  font: 700 1.03rem/1.25 Georgia, "Times New Roman", serif;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 250, 241, .92);
}

.pm-explorer-nav__disclosure > summary::-webkit-details-marker { display: none; }
.pm-explorer-nav__summary-icon { display: grid; flex: 0 0 1.8rem; width: 1.8rem; height: 1.8rem; place-items: center; color: var(--pm-gold); }
.pm-explorer-nav__summary-label { min-width: 0; }
.pm-explorer-nav__toggle { display: none; }
.pm-explorer-nav__disclosure > summary .pm-icon { width: 1.35rem; height: 1.35rem; }
.pm-explorer-nav__body { padding: .15rem 1rem 1rem; }
.pm-explorer-nav__body section { margin-top: 1rem; }

.pm-explorer-nav__heading {
  margin: 0 0 .52rem;
  padding: 0 0 .42rem;
  border: 0;
  border-bottom: 1px solid rgba(155, 117, 54, .22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #7b6038;
  font: 750 .68rem/1.3 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pm-explorer-nav a { color: #49371f; text-decoration: none !important; }
.pm-explorer-nav a:hover, .pm-explorer-nav a:focus-visible { color: var(--pm-gold); text-decoration: underline !important; text-underline-offset: .18em; }
.pm-explorer-nav__home { display: flex; justify-content: space-between; gap: .5rem; padding: .7rem 0; font-weight: 750; }
.pm-explorer-nav ul { margin: 0; padding: 0; list-style: none; }
.pm-explorer-nav__types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.pm-explorer-nav__types a { display: flex; align-items: center; gap: .4rem; padding: .5rem .42rem; border: 1px solid rgba(155, 117, 54, .17); border-radius: 9px; background: rgba(255,255,255,.68); font-size: .78rem; font-weight: 700; }
.pm-explorer-nav__types a > span { display: grid; place-items: center; flex: 0 0 1.3rem; color: var(--pm-gold); }
.pm-explorer-nav__types .pm-icon { width: .9rem; height: .9rem; }
.pm-explorer-nav__names { display: grid; max-height: 238px; overflow-y: auto; padding-right: .3rem; scrollbar-width: thin; }
.pm-explorer-nav__names a { padding: .28rem 0; border-bottom: 1px solid rgba(155, 117, 54, .1); font: 600 .84rem/1.35 Georgia, "Times New Roman", serif; }
.pm-explorer-nav__events, .pm-explorer-nav__connections { display: grid; gap: .38rem; }
.pm-explorer-nav__events a, .pm-explorer-nav__connections a { display: block; padding-left: .8rem; font-size: .82rem; line-height: 1.4; }
.pm-explorer-nav__events a::before, .pm-explorer-nav__connections a::before { content: "›"; float: left; margin-left: -.8rem; color: var(--pm-gold); }

@media (min-width: 981px) {
  .pm-explorer-nav__disclosure:not([open]) > .pm-explorer-nav__body { display: block; }
  .pm-explorer-nav__disclosure > summary { cursor: default; pointer-events: none; }
  .pm-explorer-nav__types a {
    gap: .3rem;
    padding: .52rem .58rem;
    font-size: .7rem;
  }
  .pm-explorer-nav__types a > span { flex-basis: 1.15rem; }
}

@media (max-width: 980px) {
  .pm-mythos-layout { grid-template-columns: minmax(0, 1fr); }
  .pm-explorer-nav { position: static; order: -1; }
  .pm-explorer-nav__disclosure:not([open]) > .pm-explorer-nav__body { display: none; }
  .pm-explorer-nav__disclosure[open] > .pm-explorer-nav__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; }
  .pm-explorer-nav__home { grid-column: 1 / -1; }
  .pm-explorer-nav__toggle {
    display: inline-flex;
    width: auto;
    height: auto;
    margin-left: auto;
    align-items: center;
    gap: .48rem;
    color: #76572d;
    font: 800 .64rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: .11em;
    text-transform: uppercase;
  }
  .pm-explorer-nav__toggle-mark {
    position: relative;
    display: grid;
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 1.65rem;
    place-items: center;
    border: 1px solid rgba(155, 117, 54, .5);
    border-radius: 50%;
    background: #fffdf8;
    color: var(--pm-gold-dark);
  }
  .pm-explorer-nav__toggle-mark::before { content: "+"; font: 500 1.25rem/1 system-ui, sans-serif; }
  .pm-explorer-nav__toggle-word--close { display: none; }
  .pm-explorer-nav__disclosure[open] .pm-explorer-nav__toggle-word--open { display: none; }
  .pm-explorer-nav__disclosure[open] .pm-explorer-nav__toggle-word--close { display: inline; }
  .pm-explorer-nav__disclosure[open] .pm-explorer-nav__toggle-mark::before { content: "−"; }
}

@media (max-width: 640px) {
  .pm-myth-card__profile,
  .pm-entity-card__profile { grid-template-columns: minmax(0, 1fr); }

  .pm-profile-tile,
  .pm-profile-tile:nth-child(n) {
    grid-column: auto;
    grid-template-columns: 2.25rem minmax(88px, .72fr) minmax(0, 1.28fr);
    min-height: 78px;
    padding: .65rem .72rem;
    border-right: 0;
    border-bottom: 1px solid #ebe3d7;
  }

  .pm-profile-tile:last-child { border-bottom: 0; }
  .pm-explorer-nav__disclosure[open] > .pm-explorer-nav__body { display: block; }
}

/* Cocoon places post_class() on the article inside the full-card anchor. */
body.pm-entity-listing a.entry-card-wrap:has(> .pm-entry-card--entity) {
  overflow: hidden;
  border: 1px solid var(--pm-border, #d9cdbb);
  border-radius: var(--pm-radius-card, 5px);
  background: #fffdf8;
  box-shadow: 0 10px 26px rgba(54, 39, 18, .08);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

body.pm-entity-listing a.entry-card-wrap:has(> .pm-entry-card--entity):hover {
  border-color: #b89053;
  box-shadow: 0 16px 34px rgba(54, 39, 18, .13);
  transform: translateY(-2px);
}

body.pm-entity-listing a.entry-card-wrap:has(> .pm-entry-card--entity) > .pm-entry-card--entity,
body.pm-entity-listing a.entry-card-wrap:has(> .pm-entry-card--entity):hover > .pm-entry-card--entity {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  body.pm-entity-listing a.entry-card-wrap:has(> .pm-entry-card--entity),
  body.pm-entity-listing a.entry-card-wrap:has(> .pm-entry-card--entity):hover {
    transition: none;
    transform: none;
  }
}

/* Keep the responsive Portrait inside the single-column Myth Card track.
   A fixed minimum height combined with aspect-ratio made the figure wider
   than narrow phones and silently clipped its right edge. */
@media (max-width: 760px) {
  .pm-myth-card__portrait,
  .pm-entity-card__visual {
    width: 100%;
    min-height: 0;
    height: auto;
  }

  .pm-entity-card__placeholder {
    min-height: 0;
  }
}

/* Entity article typography: keep genuine article headings available to the
   Cocoon TOC while visually separating prose from interface components. */
body.pm-entity-page .pm-entity-article-body {
  width: 100%;
  max-width: 100%;
  margin: clamp(1.8rem, 4vw, 2.8rem) 0 0;
  color: #40392f;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(.93rem, 1.25vw, 1rem);
  line-height: 1.82;
}

body.pm-entity-page .pm-entity-article-body > p:first-child {
  color: #554c40;
  font-size: 1.04em;
  line-height: 1.86;
}

body.pm-entity-page .article .pm-entity-article-body h2,
body.pm-entity-page .pm-entity-article-body h2 {
  position: relative;
  margin: clamp(2.45rem, 5vw, 3.35rem) 0 1.05rem;
  padding: .78rem 1rem .76rem 1.18rem;
  border: 0;
  border-left: 3px solid var(--pm-gold);
  border-bottom: 1px solid rgba(155, 117, 54, .26);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(247, 241, 231, .94), rgba(255, 253, 248, .32));
  box-shadow: none;
  color: #2e251a;
  font: 500 clamp(1.42rem, 2.5vw, 1.78rem)/1.28 Georgia, "Times New Roman", serif;
  letter-spacing: -.015em;
}

body.pm-entity-page .pm-entity-article-body h2::before,
body.pm-entity-page .pm-entity-article-body h2::after {
  content: none;
}

body.pm-entity-page .article .pm-entity-article-body h3,
body.pm-entity-page .pm-entity-article-body h3 {
  position: relative;
  margin: 2.1rem 0 .85rem;
  padding: .15rem 0 .38rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(155, 117, 54, .22);
  border-radius: 0;
  background: transparent;
  color: #34291c;
  font: 500 clamp(1.18rem, 2vw, 1.42rem)/1.35 Georgia, "Times New Roman", serif;
}

body.pm-entity-page .pm-entity-article-body h3::before {
  content: "";
  position: absolute;
  top: .28rem;
  bottom: .5rem;
  left: 0;
  width: 2px;
  background: var(--pm-gold);
}

body.pm-entity-page .pm-entity-article-body h4 {
  margin: 1.7rem 0 .65rem;
  color: var(--pm-gold-dark);
  font: 700 .78rem/1.4 system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.pm-entity-page .pm-entity-article-body p {
  max-width: min(92ch, 100%);
  margin: 0 auto 1.22rem;
}

body.pm-entity-page .pm-entity-article-body strong { color: #2f261b; font-weight: 700; }

body.pm-entity-page .pm-entity-article-body a {
  color: var(--pm-gold-dark);
  text-decoration-color: rgba(155, 117, 54, .55);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color var(--pm-transition), text-decoration-color var(--pm-transition);
}

body.pm-entity-page .pm-entity-article-body a:hover {
  color: var(--pm-gold);
  text-decoration-color: currentColor;
}

body.pm-entity-page .pm-entity-article-body blockquote {
  margin: 1.7rem 0;
  padding: 1.05rem 1.25rem;
  border: 0;
  border-left: 3px solid var(--pm-gold);
  background: linear-gradient(135deg, #fbf7ef, #f4ebdc);
  color: #574b3b;
  font: italic 1.02em/1.75 Georgia, "Times New Roman", serif;
}

body.pm-entity-page .pm-entity-article-body ul,
body.pm-entity-page .pm-entity-article-body ol {
  margin: .85rem 0 1.4rem;
  padding-left: 1.5rem;
}

body.pm-entity-page .pm-entity-article-body li { margin: .35rem 0; padding-left: .15rem; }

body.pm-entity-page .pm-entity-article-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(155, 117, 54, .18);
}

.pm-profile-link {
  color: #4e3517;
  font-weight: inherit;
  text-decoration-color: rgba(155, 117, 54, .48);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color var(--pm-transition), text-decoration-color var(--pm-transition);
}

.pm-profile-link:hover,
.pm-profile-link:focus-visible {
  color: var(--pm-gold);
  text-decoration-color: currentColor;
}

@media (max-width: 540px) {
  body.pm-entity-page .pm-entity-article-body { margin-top: 1.55rem; line-height: 1.76; }
  body.pm-entity-page .article .pm-entity-article-body h2,
  body.pm-entity-page .pm-entity-article-body h2 {
    margin-top: 2.15rem;
    padding: .68rem .78rem .66rem .92rem;
    font-size: 1.34rem;
  }
  body.pm-entity-page .article .pm-entity-article-body h3,
  body.pm-entity-page .pm-entity-article-body h3 { margin-top: 1.8rem; font-size: 1.16rem; }
}

/* Stronger semantic icon treatment and tighter Journey rhythm. */
.pm-myth-card__profile,
.pm-entity-card__profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-profile-tile {
  display: grid;
  grid-template-columns: 2.5rem minmax(92px, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: .72rem;
  min-height: 88px;
  padding: .78rem 1rem;
  border-right: 1px solid #ebe3d7;
  border-bottom: 1px solid #ebe3d7;
}

.pm-profile-tile:nth-child(n) {
  border-right: 1px solid #ebe3d7;
  border-bottom: 1px solid #ebe3d7;
}

.pm-profile-tile:nth-child(2n) {
  border-right: 0;
}

.pm-profile-tile:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.pm-profile-tile:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
}

.pm-profile-tile__icon {
  position: static;
  width: 2.35rem;
  height: 2.35rem;
  border-width: 1.5px;
  background: linear-gradient(145deg, #fffdf8, #f3e6d2);
  color: var(--pm-gold);
  box-shadow: inset 0 0 0 4px rgba(155, 117, 54, .075), 0 4px 12px rgba(92, 66, 29, .1);
}

.pm-profile-tile__icon .pm-icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2;
}

.pm-profile-tile__label {
  margin: 0;
  color: #9a815d;
  font-size: .57rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .13em;
}

.pm-profile-tile__value {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.pm-section-kicker .pm-icon {
  width: 1.08rem;
  height: 1.08rem;
  color: var(--pm-gold);
  stroke-width: 2;
}

.pm-journey-group__heading {
  align-items: center;
  gap: .9rem;
}

.pm-journey-group__mark {
  width: 3.15rem;
  height: 3.15rem;
  border-width: 1.5px;
  background: linear-gradient(145deg, #fffdf8, #f5ead8);
  color: var(--pm-gold);
  box-shadow: inset 0 0 0 5px rgba(155, 117, 54, .065), 0 5px 16px rgba(92, 66, 29, .09);
}

.pm-journey-group__mark .pm-icon {
  width: 1.55rem;
  height: 1.55rem;
  stroke-width: 2;
}

.pm-journey-group__title {
  font-size: 1.42rem;
  line-height: 1.12;
}

.pm-journey-group__heading p {
  max-width: 260px;
  margin-top: .24rem;
  font-size: .75rem;
  line-height: 1.35;
}

.pm-journey__groups {
  padding: clamp(.45rem, 1.2vw, .8rem);
}

.pm-journey-group {
  padding-right: clamp(.65rem, 1.5vw, 1rem);
  padding-left: clamp(.65rem, 1.5vw, 1rem);
}

.pm-journey-card {
  width: 100%;
  max-width: none;
  box-shadow: 0 5px 16px rgba(53, 39, 20, .055);
  transition: transform var(--pm-transition), box-shadow var(--pm-transition), border-color var(--pm-transition);
}

.pm-journey-card:hover {
  border-color: var(--pm-gold);
  box-shadow: var(--pm-shadow-card-hover);
  transform: translateY(-2px);
}

.pm-journey-card__visual img,
.pm-journey-card__action span {
  transition-duration: 220ms;
  transition-timing-function: ease;
}

.pm-journey-card:hover .pm-journey-card__visual img {
  transform: scale(1.015);
}

.pm-journey-card:hover .pm-journey-card__action span {
  transform: translateX(3px);
}

.pm-journey-group--characters .pm-journey-card__body {
  min-height: 162px;
  padding: .9rem var(--pm-spacing) .82rem;
}

.pm-journey-group--characters .pm-journey-card__visual {
  height: 144px;
}

.pm-journey-group--characters .pm-journey-card__relation {
  min-height: 2.05em;
}

.pm-journey-card__category-row {
  display: flex;
  align-items: center;
  gap: .48rem;
  min-height: 1.55rem;
}

.pm-journey-card__type-icon {
  display: grid;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid rgba(155, 117, 54, .42);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--pm-gold);
  box-shadow: inset 0 0 0 3px rgba(155, 117, 54, .06);
}

.pm-journey-card__type-icon .pm-icon {
  width: .78rem;
  height: .78rem;
  stroke-width: 2;
}

.pm-journey-group:not(.pm-journey-group--characters) {
  grid-template-columns: minmax(170px, .4fr) minmax(0, 1fr);
  gap: .9rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card-grid,
.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
  width: 100%;
  max-width: none;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card-grid {
  grid-auto-rows: auto;
  align-items: start;
  align-self: center;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
  grid-template-columns: clamp(126px, 34%, 168px) minmax(0, 1fr);
  align-self: center;
  min-height: 0;
  height: 132px !important;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__visual {
  min-height: 0;
  height: 132px !important;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__body {
  flex: none;
  height: 132px;
  box-sizing: border-box;
  padding: .66rem var(--pm-spacing) .62rem;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__name {
  margin: .28rem 0 .2rem;
  line-height: 1.08;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__relation {
  min-height: 0;
  line-height: 1.3;
}

.pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__action {
  padding-top: .5rem;
}

.pm-journey-card__emblem {
  width: 62px;
  height: 62px;
  border-width: 1.5px;
  background: rgba(33, 27, 20, .32);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .1), 0 7px 20px rgba(22, 17, 11, .2);
}

.pm-journey-card__emblem .pm-icon {
  width: 2rem;
  height: 2rem;
  stroke-width: 2;
}

@media (max-width: 850px) {
  .pm-journey-group:not(.pm-journey-group--characters) {
    grid-template-columns: minmax(145px, .35fr) minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .pm-profile-tile {
    grid-template-columns: 2.35rem minmax(88px, .8fr) minmax(0, 1.2fr);
    gap: .62rem;
    min-height: 82px;
    padding: .7rem .78rem;
  }

  .pm-profile-tile:nth-child(n) {
    border-right: 0;
    border-bottom: 1px solid #ebe3d7;
  }

  .pm-profile-tile:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  .pm-profile-tile__icon {
    width: 2.2rem;
    height: 2.2rem;
  }

  .pm-profile-tile__value {
    font-size: .94rem;
  }

  .pm-journey-group__mark {
    width: 2.7rem;
    height: 2.7rem;
  }

  .pm-journey-group__mark .pm-icon {
    width: 1.3rem;
    height: 1.3rem;
  }

  .pm-journey-group:not(.pm-journey-group--characters) {
    display: block;
  }

  .pm-journey-group--characters .pm-journey-card,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
    grid-template-columns: 110px minmax(0, 1fr);
    min-height: 132px;
    height: auto !important;
  }

  .pm-journey-group--characters .pm-journey-card__visual,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__visual {
    min-height: 132px;
    height: 100% !important;
  }

  .pm-journey-group--characters .pm-journey-card__body,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card__body {
    flex: 1;
    min-height: 0;
    height: auto;
    padding: .78rem .8rem .74rem;
  }

  .pm-journey-card__type-icon {
    width: 1.45rem;
    height: 1.45rem;
  }
}

@media (max-width: 380px) {
  .pm-journey-group--characters .pm-journey-card,
  .pm-journey-group:not(.pm-journey-group--characters) .pm-journey-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }
}

/* Final specificity layer for Character Foundation Pack stability. */
.pm-myth-card__name,
.pm-entity-card__name {
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
.pm-entity-card__name--short { font-size: clamp(3.75rem, 7.1vw, 6.5rem); }
.pm-entity-card__name--medium { font-size: clamp(3.15rem, 5.8vw, 5rem); }
.pm-entity-card__name--long { font-size: clamp(2.72rem, 5vw, 4.25rem); }

.pm-profile-tile {
  grid-template-columns: 2.5rem minmax(106px, .82fr) minmax(0, 1.18fr);
  min-height: 84px;
  padding: .72rem .9rem;
}
.pm-profile-tile__value { font-weight: 650; overflow-wrap: break-word; }

.pm-journey-group--characters .pm-journey-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}
.pm-journey-group--characters .pm-journey-card {
  display: flex;
  height: 100% !important;
  flex-direction: column;
}
.pm-journey-group--characters .pm-journey-card__visual {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}
.pm-journey-group--characters .pm-journey-card__body {
  min-height: 154px;
  padding: .72rem .75rem .68rem;
}
.pm-journey-group--characters .pm-journey-card__relation { min-height: 2.35em; line-height: 1.28; }

@media (max-width: 900px) {
  .pm-journey-group--characters .pm-journey-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .pm-entity-card__name--short { font-size: clamp(3.35rem, 14vw, 5rem); }
  .pm-entity-card__name--medium { font-size: clamp(3rem, 12vw, 4.35rem); }
  .pm-entity-card__name--long { font-size: clamp(2.55rem, 10.5vw, 3.85rem); }
}

@media (max-width: 540px) {
  .pm-profile-tile {
    grid-template-columns: 2.25rem minmax(88px, .78fr) minmax(0, 1.22fr);
    min-height: 78px;
    padding: .64rem .7rem;
  }
  .pm-journey-group--characters .pm-journey-card-grid { grid-template-columns: minmax(0, 1fr); }
  .pm-journey-group--characters .pm-journey-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 128px;
    height: auto !important;
  }
  .pm-journey-group--characters .pm-journey-card__visual {
    min-height: 128px;
    height: 100% !important;
    aspect-ratio: auto;
  }
  .pm-journey-group--characters .pm-journey-card__body { min-height: 0; padding: .68rem .72rem .64rem; }
  .pm-journey-group--characters .pm-journey-card__relation { min-height: 0; }
}

/* 1.7.1 final cascade guard: intentionally the last declarations. */
body.pm-entity-page .article-header > .entry-title,
body.pm-entity-page article > .entry-title {
  display: none !important;
}

body.pm-project-mythos-layout .pm-profile-tile:nth-last-child(2):nth-child(even) {
  border-bottom: 1px solid #ebe3d7;
}

@media (max-width: 640px) {
  body.pm-project-mythos-layout .pm-myth-card__profile,
  body.pm-project-mythos-layout .pm-entity-card__profile,
  body.pm-project-mythos-layout .pm-entity-card--event .pm-entity-card__profile {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.pm-project-mythos-layout .pm-profile-tile,
  body.pm-project-mythos-layout .pm-profile-tile:nth-child(n) {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid #ebe3d7;
  }

  body.pm-project-mythos-layout .pm-profile-tile:last-child {
    border-bottom: 0;
  }
}

/* 1.8.0: manually placed homepage gateway shortcode. */
.pm-home-portal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  margin: clamp(2rem, 5vw, 4.5rem) auto;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid rgba(155, 117, 54, .3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 4%, rgba(205, 169, 103, .2), transparent 31%),
    linear-gradient(145deg, #fffdf8 0%, #f6ecdd 100%);
  box-shadow: 0 22px 55px rgba(48, 35, 17, .12);
  color: #2f261d;
}

.pm-home-portal::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .42;
  background-image: linear-gradient(90deg, transparent 49.8%, rgba(155,117,54,.08) 50%, transparent 50.2%);
  background-size: 76px 100%;
  pointer-events: none;
}

.pm-home-portal__intro { max-width: 760px; margin-inline: auto; text-align: center; }
.pm-home-portal__kicker {
  margin: 0 0 .65rem !important;
  color: #8a6632;
  font: 800 .68rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
}

body .pm-home-portal h2,
body .article .pm-home-portal h2,
body .entry-content .pm-home-portal h2 {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #241d16;
  font: 500 clamp(2rem, 5vw, 4rem)/1.02 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
  text-align: center;
}

body .pm-home-portal h2::before,
body .pm-home-portal h2::after { content: none; }

.pm-home-portal__lead {
  max-width: 650px;
  margin: 1rem auto 0 !important;
  color: #655b50;
  font-size: 1rem;
  line-height: 1.75;
}

.pm-home-portal__routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: clamp(1.4rem, 3vw, 2.25rem);
}

.pm-home-portal__route {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: .9rem;
  min-width: 0;
  padding: 1.05rem;
  border: 1px solid rgba(155, 117, 54, .22);
  border-radius: 13px;
  background: rgba(255, 253, 248, .86);
  color: #382b1d !important;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(54, 39, 18, .06);
  transition: transform var(--pm-transition), border-color var(--pm-transition), box-shadow var(--pm-transition);
}

.pm-home-portal__route:hover,
.pm-home-portal__route:focus-visible {
  border-color: rgba(155, 117, 54, .58);
  color: #382b1d !important;
  text-decoration: none !important;
  box-shadow: 0 13px 28px rgba(54, 39, 18, .12);
  transform: translateY(-2px);
}

.pm-home-portal__icon {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 1px solid rgba(155, 117, 54, .25);
  border-radius: 50%;
  background: #f7ecda;
  color: #9b7536;
}
.pm-home-portal__icon .pm-icon { width: 1.55rem; height: 1.55rem; }
.pm-home-portal__route-body { display: grid; min-width: 0; }
.pm-home-portal__route-label { font: 600 1.28rem/1.15 Georgia, "Times New Roman", serif; }
.pm-home-portal__route-description { margin-top: .38rem; color: #71675b; font-size: .82rem; line-height: 1.52; }
.pm-home-portal__route-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .72rem;
  color: #8a6632;
  font: 800 .64rem/1.25 system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pm-home-portal__all {
  display: flex;
  width: fit-content;
  margin: 1.2rem auto 0;
  align-items: center;
  gap: .75rem;
  padding: .78rem 1.1rem;
  border: 1px solid #8e6832;
  border-radius: 999px;
  background: #3a2d20;
  color: #fff9ec !important;
  font: 800 .72rem/1.2 system-ui, sans-serif;
  letter-spacing: .09em;
  text-decoration: none !important;
  text-transform: uppercase;
}
.pm-home-portal__all:hover,
.pm-home-portal__all:focus-visible { background: #6f512a; color: #fff !important; text-decoration: none !important; }

@media (max-width: 700px) {
  .pm-home-portal { border-radius: 14px; }
  .pm-home-portal__routes { grid-template-columns: minmax(0, 1fr); }
  .pm-home-portal__route { grid-template-columns: 2.8rem minmax(0, 1fr); padding: .9rem; }
  .pm-home-portal__icon { width: 2.8rem; height: 2.8rem; }
  .pm-home-portal__route-label { font-size: 1.16rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-home-portal__route { transition: none; }
}

/* Exact-tag bridge between ordinary artwork posts and Project Mythos Entities. */
.pm-tag-entity-bridge,
.pm-tag-artwork {
  box-sizing: border-box;
  width: 100%;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 1px solid rgba(155, 117, 54, .24);
  border-radius: 16px;
  background: linear-gradient(145deg, #fffdf8 0%, #f8efdf 100%);
  box-shadow: 0 12px 30px rgba(54, 39, 18, .08);
}
.pm-tag-entity-bridge *, .pm-tag-artwork * { box-sizing: border-box; }
.pm-tag-entity-bridge__header, .pm-tag-artwork__header { margin: 0 0 1.1rem; }
.pm-tag-entity-bridge__header > p:last-child,
.pm-tag-artwork__header > p:last-child {
  max-width: 680px;
  margin: .45rem 0 0;
  color: #6d6256;
  font: 400 .9rem/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.pm-tag-bridge__kicker {
  margin: 0 0 .38rem !important;
  color: #8a6632;
  font: 800 .66rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
body .pm-tag-bridge__heading {
  margin: 0;
  color: #2d241b;
  font: 650 clamp(1.3rem, 3vw, 1.75rem)/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.02em;
}
.pm-tag-entity-bridge__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: .85rem;
}
.pm-tag-entity-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(155, 117, 54, .2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  color: #30271e !important;
  text-decoration: none !important;
  transition: border-color var(--pm-transition), box-shadow var(--pm-transition), transform var(--pm-transition);
}
.pm-tag-entity-card:hover, .pm-tag-entity-card:focus-visible,
.pm-tag-artwork-card:hover, .pm-tag-artwork-card:focus-visible {
  border-color: rgba(142, 104, 50, .62);
  color: #30271e !important;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(54, 39, 18, .12);
  transform: translateY(-2px);
}
.pm-tag-entity-card__visual, .pm-tag-artwork-card__visual {
  display: block;
  min-width: 0;
  overflow: hidden;
  background: #e9dfcf;
}
.pm-tag-entity-card__visual { aspect-ratio: 4 / 5; }
.pm-tag-artwork-card__visual { aspect-ratio: 4 / 3; }
.pm-tag-entity-card__visual img, .pm-tag-artwork-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}
.pm-tag-entity-card__body, .pm-tag-artwork-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}
.pm-tag-entity-card__body { padding: .8rem .85rem; }
.pm-tag-artwork-card__body { padding: .72rem .78rem .78rem; }
.pm-tag-card__type {
  color: #8a6632;
  font: 800 .58rem/1.25 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
body .pm-tag-card__title {
  display: -webkit-box;
  margin-top: .3rem;
  overflow: hidden;
  color: #2e251d;
  font: 700 .9rem/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.pm-tag-card__summary {
  display: -webkit-box;
  margin-top: .38rem;
  overflow: hidden;
  color: #6c6257;
  font: 400 .72rem/1.48 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.pm-tag-card__action {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  padding-top: .65rem;
  color: #7d5a29;
  font: 800 .61rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pm-tag-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #a07c45;
}
.pm-tag-card__placeholder .pm-icon { width: 30%; height: 30%; }
.pm-tag-artwork__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.pm-tag-artwork-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(155, 117, 54, .2);
  border-radius: 11px;
  background: rgba(255, 255, 255, .92);
  color: #30271e !important;
  text-decoration: none !important;
  transition: border-color var(--pm-transition), box-shadow var(--pm-transition), transform var(--pm-transition);
}
.pm-tag-artwork__all {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: .55rem;
  margin: 1rem 0 0 auto;
  color: #765526 !important;
  font: 800 .68rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .05em;
  text-decoration: none !important;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .pm-tag-artwork__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pm-tag-entity-bridge, .pm-tag-artwork { padding: 1rem; border-radius: 13px; }
  .pm-tag-entity-bridge__grid { grid-template-columns: minmax(0, 1fr); }
  .pm-tag-entity-card { grid-template-columns: 92px minmax(0, 1fr); }
  .pm-tag-artwork__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .pm-tag-artwork-card__body { padding: .62rem .65rem .7rem; }
  body .pm-tag-card__title { font-size: .82rem; }
  .pm-tag-card__action { font-size: .56rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-tag-entity-card, .pm-tag-artwork-card { transition: none; }
}
