/* ==========================================================
   phlwest — Blog /x (Journal Stream)
   Single stylesheet, conditionally enqueued only on /x page.
   All colors through CSS Custom Properties — swap :root values
   to retheme (e.g. black → warm cream) without touching anything else.
   ========================================================== */

:root {
  /* Basis — very subtle warm off-white, paper */
  --bg-primary: #f8f5ef;
  --bg-secondary: #f0ebe3;
  --bg-elevated: #ebe4d9;

  /* Text — warm near-black ink */
  --text-primary: #1a1410;
  --text-secondary: rgba(26, 20, 16, 0.62);
  --text-muted: rgba(26, 20, 16, 0.3);

  /* Brand */
  --orange: #ff5a1a;
  --orange-deep: #b32a08;
  --orange-menu: #ff320a;
  --orange-subtle: rgba(255, 90, 26, 0.07);
  --magenta: #e040fb;

  /* Struktur */
  --border-default: rgba(26, 20, 16, 0.1);
  --border-orange: rgba(255, 90, 26, 0.22);

  /* Typografie */
  --font-display: "superior-title", "Times New Roman", serif;
  --font-body: "futura-pt", "Helvetica Neue", sans-serif;
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-mood: "amador", "superior-title", serif;

  /* Spacing */
  --post-padding-x: 40px;
  --post-padding-y: 56px;
  --menu-width: 200px;

  /* How much horizontal space to reserve on the left for the fixed sidebar menu.
     Applied as left-offset on the readable column elements (.journal-header,
     .post-stream, .journal-footer, .load-more-wrap). Full-bleed elements
     (e.g. RELEASE) sit directly on .journal-x and ignore this var. */
  --menu-gap: 480px;
}

@media (max-width: 1280px) { :root { --menu-gap: 360px; } }
@media (max-width: 1024px) { :root { --menu-gap: 310px; } }
@media (max-width: 768px)  { :root { --menu-gap: 0px; } }

/* ==========================================================
   LAYOUT
   ========================================================== */

/* Override the theme's Customizer !important body background on /x only.
   The template body class is added automatically when page-x.php is used. */
body.page-template-page-x,
body.page-template-page-x .elementor-page,
body.page-template-page-x .elementor,
body.page-template-page-x [class*="elementor-kit"] {
  background: var(--bg-primary) !important;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.journal-x {
  padding: 80px 0 100px 0;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: clip;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Shared readable-column offset.
   max-width the column to 800px, push it to the right of the sidebar. */
.journal-header,
.post-stream,
.journal-footer,
.load-more-wrap {
  max-width: 800px;
  margin-left: calc(var(--menu-gap) + max(0px, (100vw - var(--menu-gap) - 40px - 800px) / 2));
  margin-right: 40px;
}

.journal-header {
  margin-bottom: 64px;
  padding: 0 var(--post-padding-x);
}

.journal-header-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.post-stream {
  position: relative;
  isolation: isolate;
  /* Space between consecutive .post-stream segments (when a RELEASE breaks the flow) */
  margin-top: 0;
}

.post-stream + .post-stream { margin-top: 0; }

/* Print furniture — registration marks at the four corners of the stream.
   Four tiny SVG crosshairs (one per corner), drawn as background-images.
   Pointer-events none, sits above content but below text. */
.post-stream::after {
  content: "";
  position: absolute;
  inset: -40px -20px;
  pointer-events: none;
  z-index: 2;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><g stroke='%23ff5a1a' stroke-width='0.75' fill='none' opacity='0.55'><line x1='9' y1='0' x2='9' y2='18'/><line x1='0' y1='9' x2='18' y2='9'/><circle cx='9' cy='9' r='3.5'/></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><g stroke='%23ff5a1a' stroke-width='0.75' fill='none' opacity='0.55'><line x1='9' y1='0' x2='9' y2='18'/><line x1='0' y1='9' x2='18' y2='9'/><circle cx='9' cy='9' r='3.5'/></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><g stroke='%23ff5a1a' stroke-width='0.75' fill='none' opacity='0.55'><line x1='9' y1='0' x2='9' y2='18'/><line x1='0' y1='9' x2='18' y2='9'/><circle cx='9' cy='9' r='3.5'/></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><g stroke='%23ff5a1a' stroke-width='0.75' fill='none' opacity='0.55'><line x1='9' y1='0' x2='9' y2='18'/><line x1='0' y1='9' x2='18' y2='9'/><circle cx='9' cy='9' r='3.5'/></g></svg>");
  background-position: top left, top right, bottom left, bottom right;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

/* Light leaks — soft orange radial atmosphere behind the stream.
   Pseudo-element, pointer-events none, sits behind content. */
.post-stream::before {
  content: "";
  position: absolute;
  inset: -200px -20vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 700px 500px at 12% 8%,  rgba(255, 90, 26, 0.07), transparent 60%),
    radial-gradient(ellipse 500px 400px at 92% 38%, rgba(255, 90, 26, 0.05), transparent 60%),
    radial-gradient(ellipse 600px 600px at 30% 72%, rgba(255, 90, 26, 0.045), transparent 60%),
    radial-gradient(ellipse 450px 450px at 82% 96%, rgba(255, 90, 26, 0.04), transparent 60%);
}

.journal-empty {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 var(--post-padding-x);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.journal-empty code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  color: var(--orange);
  font-size: 12px;
}

.journal-footer {
  margin-top: 100px;
  margin-bottom: 40px;
  padding: 48px var(--post-padding-x) 0;
  border-top: 1px solid var(--border-default);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.journal-colophon {
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.4;
}

.journal-colophon .colophon-line:first-child {
  color: var(--text-secondary);
  letter-spacing: 0.4em;
}

/* ==========================================================
   COMMON POST PRIMITIVES
   ========================================================== */

.phl-x-post {
  position: relative;
  padding: var(--post-padding-y) var(--post-padding-x);
  isolation: isolate;
}

/* Folio mark — each post gets a magazine-style issue number in its top-right.
   Numbers are stable per post (oldest = № 001, newest = highest), computed
   server-side and passed via data-folio attribute. */
.phl-x-post::before {
  content: "№ " attr(data-folio);
  position: absolute;
  top: 22px;
  right: var(--post-padding-x);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.post-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange-deep);
  opacity: 1;
  margin-bottom: 32px;
}

.post-date {
  display: block;
  margin-top: 40px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: right;
  color: var(--text-muted);
}

.new-star {
  display: inline-block;
  margin-right: 6px;
  color: var(--orange);
  font-size: 9px;
  transition: color 200ms ease;
}

.new-star:hover {
  color: var(--magenta);
}

.phl-x-divider {
  border: 0;
  height: 1px;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-orange) 50%,
    transparent 100%
  );
}

/* ==========================================================
   FORMAT 01 — DROP
   ========================================================== */

.phl-x-drop .drop-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(50px, 9.5vw, 122px);
  line-height: 1.0;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0 0 32px;
  letter-spacing: -0.015em;
}

.phl-x-drop .drop-body {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.55;
  color: var(--text-primary);
  max-width: 600px;
  letter-spacing: 0.005em;
}

.phl-x-drop .drop-body p {
  margin: 0 0 1em;
}

.phl-x-drop .drop-body p:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   FORMAT 02 — TAPE
   ========================================================== */

.phl-x-tape {
  padding-left: calc(var(--post-padding-x) + 32px);
}

.phl-x-tape .tape-line {
  position: absolute;
  left: -100vw;
  right: calc(100% - var(--post-padding-x) - 4px);
  top: var(--post-padding-y);
  bottom: var(--post-padding-y);
  width: auto;
  background: var(--orange-menu);
}

.phl-x-tape .tape-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.phl-x-tape .tape-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 600px;
  margin-bottom: 36px;
}

.phl-x-tape .tape-text p {
  margin: 0 0 1em;
}

.phl-x-tape .tape-text p:last-child {
  margin-bottom: 0;
}

.tape-player {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 540px;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-orange);
}

.tape-play {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--orange);
  background: transparent;
  color: var(--orange);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tape-play:hover {
  color: var(--magenta);
  border-color: var(--magenta);
}

.tape-player.is-playing .tape-play {
  color: var(--magenta);
  border-color: var(--magenta);
  background: rgba(224, 64, 251, 0.05);
}

.tape-player.is-playing .tape-icon-play { display: none; }
.tape-player.is-playing .tape-icon-pause { display: inline !important; }

.tape-waveform {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
}

.tape-bar {
  flex: 1 1 0;
  min-width: 2px;
  background: var(--text-muted);
  transition: background 200ms ease;
}

.tape-player.is-playing .tape-bar.is-progress {
  background: var(--orange);
}

.tape-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: right;
}

.tape-audio-label {
  color: var(--orange);
  opacity: 0.6;
}

.tape-duration {
  color: var(--text-muted);
}

/* ==========================================================
   FORMAT 03 — FRAME
   ========================================================== */

/* FRAME is a breakout — sibling of .post-stream, wider than the 800px column.
   Max 1200px, centered within the content area right of the sidebar menu.
   On narrow viewports it fills the available space (with a right-side gutter). */
.phl-x-frame {
  max-width: 1200px;
  margin-left: calc(var(--menu-gap) + max(0px, (100vw - var(--menu-gap) - 40px - 1200px) / 2));
  margin-right: 40px;
  padding-left: 0;
  padding-right: 0;
}

.phl-x-frame .post-label,
.phl-x-frame .post-date,
.phl-x-frame .frame-title,
.phl-x-frame .frame-caption {
  padding-left: var(--post-padding-x);
  padding-right: var(--post-padding-x);
}

.frame-single {
  position: relative;
  margin: 0;
  width: 100%;
}

.frame-single img {
  width: 100%;
  height: auto;
  display: block;
}

.frame-title {
  margin: 32px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.05;
  color: var(--text-primary);
  text-transform: uppercase;
}

.frame-caption {
  margin: 20px 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Gallery strip */
.frame-polaroids {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.frame-polaroids::-webkit-scrollbar { display: none; }
.frame-polaroids.is-dragging { cursor: grabbing; }

.polaroid {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  transform: none;
  transition: none;
  user-select: none;
}

.polaroid:hover {
  transform: none;
}

.polaroid img {
  display: block;
  width: auto;
  height: clamp(600px, 70vh, 1000px);
  aspect-ratio: auto;
  object-fit: cover;
  pointer-events: none;
}

.polaroid figcaption {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: left;
  letter-spacing: 0.05em;
}

/* ==========================================================
   FORMAT 04 — ESSAY
   ========================================================== */

.phl-x-essay {
  max-width: 680px;
}

.phl-x-essay .essay-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(46px, 5.5vw, 74px);
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.phl-x-essay .essay-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0 0 40px;
}

.phl-x-essay .essay-body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.85;
  color: var(--text-primary);
  max-width: 640px;
}

.phl-x-essay .essay-body p {
  margin: 0 0 1.1em;
}

.phl-x-essay .essay-body h2,
.phl-x-essay .essay-body h3,
.phl-x-essay .essay-body h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 2em 0 0.8em;
}

.phl-x-essay .essay-body a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--orange);
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.phl-x-essay .essay-body a:hover {
  color: var(--orange);
  border-bottom-width: 2px;
  border-bottom-color: var(--orange);
}

.phl-x-essay .essay-body em {
  font-style: italic;
}

.phl-x-essay .essay-body blockquote {
  margin: 1.5em 0;
  padding-left: 24px;
  border-left: 2px solid var(--border-orange);
  color: var(--text-secondary);
  font-style: italic;
}

/* ==========================================================
   FORMAT 05 — RELEASE
   Full-bleed, edge-to-edge. Lives as a direct child of .journal-x
   (sibling of .post-stream), so it escapes the sidebar offset.
   Image is NOT darkened. Text uses shadow to stay readable on any cover.
   ========================================================== */

.phl-x-release {
  position: relative;
  padding: 0;
  width: 100vw;
  margin: 0;
  display: block;
  overflow: hidden;
  isolation: isolate;
}

/* Wenn kein Cover gesetzt ist, fällt der Container auf eine sinnvolle Mindesthöhe,
   damit die Text-Inner-Box nicht ins Nichts gerendert wird. */
.phl-x-release:not(.phl-x-release--has-image) {
  min-height: 60vh;
  background: #0a0a0a;
}

/* Echtes <img> statt background-image: zeigt das ganze Bild, egal welches Format.
   Bild bestimmt die Container-Höhe; auf 100vw skaliert, height auto. */
.phl-x-release .release-img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 0;
}

/* Thin bottom-edge gradient — only enough to ensure subtitle + CTA are readable,
   the rest of the image stays fully visible. */
.phl-x-release .release-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 55%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

/* Text-Overlay sitzt absolut am unteren Bildrand. */
.phl-x-release .release-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 80px var(--post-padding-x) 72px;
  text-align: center;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* Fallback wenn kein Cover: Inner-Box im normalen Flow rendern. */
.phl-x-release:not(.phl-x-release--has-image) .release-inner {
  position: relative;
}

.phl-x-release .post-label {
  margin-bottom: 20px;
  color: #fff;
  opacity: 0.85;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.phl-x-release .release-title {
  font-family: var(--font-mood);
  font-weight: 400;
  font-size: clamp(80px, 14vw, 220px);
  line-height: 0.9;
  text-transform: lowercase;
  color: var(--text-primary);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.phl-x-release .release-subtitle {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
  margin: 0 0 40px;
}

.phl-x-release .release-cta {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid #fff;
  color: #fff;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.phl-x-release .release-cta:hover {
  color: var(--orange);
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.95);
}

.phl-x-release .post-date {
  margin-top: 28px;
  color: #fff;
  opacity: 0.7;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* Folio mark sits at top-right corner, kept white + shadowed so it stays
   readable across any cover art. Overrides the default dark-muted color. */
.phl-x-release.phl-x-post::before {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  top: 28px;
}

/* ==========================================================
   FORMAT 06 — EMBED
   ========================================================== */

.phl-x-embed .embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.phl-x-embed .embed-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  opacity: 0.5;
  transition: opacity 200ms ease, color 200ms ease;
}

.phl-x-embed .embed-frame:hover .embed-placeholder {
  color: var(--magenta);
  opacity: 0.8;
}

.phl-x-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.phl-x-embed .embed-caption {
  margin: 24px 0 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
}

/* ==========================================================
   FORMAT 07 — PLACEHOLDER
   ========================================================== */

.phl-x-placeholder {
  opacity: 0.2;
  min-height: 80px;
}

/* ==========================================================
   FORMAT 08 — COMPOSE
   Free Gutenberg layout — the escape hatch. Renders the_content()
   inside a readable column. Base block styles get light resets.
   ========================================================== */

.phl-x-compose {
  max-width: 720px;
}

.phl-x-compose .compose-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 4.5vw, 62px);
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 32px;
}

.phl-x-compose .compose-body {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-primary);
}

.phl-x-compose .compose-body > * {
  max-width: 640px;
}

.phl-x-compose .compose-body > .alignwide,
.phl-x-compose .compose-body > .alignfull,
.phl-x-compose .compose-body > .wp-block-columns,
.phl-x-compose .compose-body > .wp-block-gallery,
.phl-x-compose .compose-body > figure {
  max-width: 100%;
}

.phl-x-compose .compose-body p { margin: 0 0 1.1em; }

.phl-x-compose .compose-body h2,
.phl-x-compose .compose-body h3,
.phl-x-compose .compose-body h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 1.5em 0 0.6em;
  line-height: 1.15;
  color: var(--text-primary);
}

.phl-x-compose .compose-body h2 { font-size: 32px; }
.phl-x-compose .compose-body h3 { font-size: 24px; }
.phl-x-compose .compose-body h4 { font-size: 18px; letter-spacing: 0.1em; text-transform: uppercase; }

.phl-x-compose .compose-body a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--orange);
  text-decoration: none;
}

.phl-x-compose .compose-body a:hover {
  color: var(--orange);
  border-bottom-width: 2px;
  border-bottom-color: var(--orange);
}

.phl-x-compose .compose-body img { max-width: 100%; height: auto; display: block; }

.phl-x-compose .compose-body figure { margin: 1.5em 0; }

.phl-x-compose .compose-body figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.phl-x-compose .compose-body blockquote {
  margin: 1.8em 0;
  padding-left: 24px;
  border-left: 2px solid var(--border-orange);
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
}

.phl-x-compose .compose-body .wp-block-columns { gap: 32px; margin: 1.5em 0; }

.phl-x-compose .compose-body .wp-block-gallery {
  margin: 1.5em 0;
}

/* ==========================================================
   LOAD MORE
   ========================================================== */

.load-more-wrap {
  margin-top: 60px;
  padding: 0 var(--post-padding-x);
  text-align: center;
}

.load-more {
  display: inline-block;
  padding: 14px 40px;
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.load-more:hover {
  color: var(--magenta);
  border-color: var(--magenta);
}

.load-more.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

/* ==========================================================
   STAR TRANSITION (page-leave overlay)
   ========================================================== */

.star-transition {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background 400ms ease;
}

.star-transition.is-fading {
  background: rgba(0, 0, 0, 1);
}

.star-transition .star {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  animation: phlxStarFade 600ms ease forwards;
  z-index: 9999;
}

@keyframes phlxStarFade {
  0%   { opacity: 0; transform: scale(0.5) rotate(0deg); }
  40%  { opacity: 1; transform: scale(1.2) rotate(15deg); }
  100% { opacity: 0; transform: scale(0.8) rotate(30deg); }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 768px) {
  :root {
    --post-padding-x: 24px;
    --post-padding-y: 44px;
  }

  .journal-x {
    padding: 40px 0 260px;
  }

  /* On mobile the sidebar menu is in a bottom bar, so full horizontal space. */
  .journal-header,
  .post-stream,
  .journal-footer,
  .load-more-wrap,
  .phl-x-frame {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .journal-header {
    margin-bottom: 40px;
  }

  .phl-x-drop .drop-headline {
    font-size: clamp(44px, 12vw, 72px);
  }

  .phl-x-drop .drop-body { font-size: 20px; }

  .phl-x-tape .tape-title { font-size: clamp(32px, 7vw, 44px); }
  .phl-x-tape .tape-text  { font-size: 19px; }

  .phl-x-essay .essay-title { font-size: clamp(36px, 8vw, 52px); }
  .phl-x-essay .essay-body  { font-size: 20px; }

  .phl-x-release .release-title { font-size: clamp(60px, 18vw, 120px); }

  .phl-x-tape {
    padding-left: calc(var(--post-padding-x) + 24px);
  }

  /* Nur noch greifen wenn kein Cover gesetzt ist; das echte Bild bestimmt sonst die Höhe. */
  .phl-x-release:not(.phl-x-release--has-image) {
    min-height: 60vh;
  }

  .polaroid img { height: clamp(320px, 60vh, 600px); }

  .tape-player {
    flex-wrap: wrap;
  }

  .tape-meta {
    flex-direction: row;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }
}

/* ==========================================================
   RELEASE CARD — stream variant (Subplan 8 shortcode)
   Rendered via [phl_release slug="..."] inside any /x post body.
   Lives in the 800px reading column; takes its full width.
   ========================================================== */

.phl-release-card--stream {
  display: block;
  margin: 56px 0;
  padding: 0 var(--post-padding-x);
  font-family: var(--font-body);
  color: var(--text-primary);
}

.phl-release-card--stream .phl-release-card-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--border-orange);
  box-shadow:
    0 12px 32px rgba(26, 20, 16, 0.18),
    0 2px 6px rgba(26, 20, 16, 0.1);
}

.phl-release-card--stream .phl-release-card-title {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.phl-release-links--stream {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.phl-release-links--stream li { margin: 0; }

.phl-release-links--stream .phl-release-link {
  display: inline-block;
  padding: 11px 18px;
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.phl-release-links--stream .phl-release-link:hover,
.phl-release-links--stream .phl-release-link:focus-visible {
  background: var(--orange);
  color: var(--bg-primary);
  border-color: var(--orange);
  outline: none;
}

@media (max-width: 768px) {
  .phl-release-card--stream {
    margin: 40px 0;
    padding: 0 24px;
  }
  .phl-release-card--stream .phl-release-card-title {
    margin-top: 22px;
  }
  .phl-release-links--stream {
    margin-top: 18px;
  }
  .phl-release-links--stream .phl-release-link {
    padding: 10px 14px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }
}

/* ==========================================================
   EXPERIMENT — DARK PHOTO BACKGROUND (2026-04-23)
   Zum Reverten: diesen Block komplett löschen.
   Swap paper-light → dunkles Foto als fixed background, text auf weiß,
   orange bleibt erhalten. Alles andere im File unverändert.
   ========================================================== */

/* Fixed background via real div — Safari hat einen Bug bei body::before { position:fixed }:
   der Browser berechnet die Scroll-Höhe falsch → Seite snapt beim ersten Scroll zurück.
   Echtes DOM-Element umgeht das. */
body.page-template-page-x {
  background: transparent !important;
}

.journal-bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #0a0806;
  background-image:
    linear-gradient(rgba(10, 8, 6, 0.55), rgba(10, 8, 6, 0.55)),
    url("https://phlwest.com/wp-content/uploads/2026/04/DSC09273-Kopie.webp");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

body.page-template-page-x .journal-x,
body.page-template-page-x .elementor-page,
body.page-template-page-x .elementor,
body.page-template-page-x [class*="elementor-kit"] {
  background: transparent !important;
  background-color: transparent !important;
}

body.page-template-page-x {
  --bg-primary: transparent;
  --bg-secondary: rgba(255, 255, 255, 0.04);
  --bg-elevated: rgba(255, 255, 255, 0.06);

  --text-primary: #f4efe6;
  --text-secondary: rgba(244, 239, 230, 0.7);
  --text-muted: rgba(244, 239, 230, 0.4);

  --border-default: rgba(244, 239, 230, 0.14);
}

/* Light-leak hinter dem Stream: vorher sehr subtil, auf dunklem Foto zu unsichtbar —
   etwas kräftiger und mit leichter Vignette nach außen. */
body.page-template-page-x .post-stream::before {
  background:
    radial-gradient(ellipse 700px 500px at 12% 8%,  rgba(255, 90, 26, 0.12), transparent 60%),
    radial-gradient(ellipse 500px 400px at 92% 38%, rgba(255, 90, 26, 0.09), transparent 60%),
    radial-gradient(ellipse 600px 600px at 30% 72%, rgba(255, 90, 26, 0.08), transparent 60%),
    radial-gradient(ellipse 450px 450px at 82% 96%, rgba(255, 90, 26, 0.07), transparent 60%);
}

/* Essay-/Compose-Links: color war text-primary (dunkel) → wird jetzt automatisch weiß
   via --text-primary Override. Border bleibt orange. Alles gut, kein Extra nötig. */

/* Tape-Player hatte hellen bg-elevated Hintergrund — bleibt jetzt über
   --bg-elevated dunkel-transparent. Bordername bleibt orange. */

/* Code-Snippet im journal-empty: bg-elevated ist jetzt durchscheinend, Orange-Text weiter gut lesbar. */

/* Folio-Mark: liest --text-muted → jetzt weiß-transparent, perfekt auf dunklem Foto. */
