/* Journal controls share the service's green and paper palette. */
.lys-clean-cover { max-width: 100%; height: auto; }
.lys-reader { color: #183b38; margin-block: 1.5rem 2rem; }
.lys-reading-tools { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; border-block: 1px solid #d7dfd3; padding-block: .75rem; }
.lys-reading-tools button { font: inherit; font-size: .875rem; color: inherit; background: transparent; border: 1px solid #bdcfc3; border-radius: 3px; min-height: 44px; padding: .5rem .9rem; cursor: pointer; }
.lys-reading-tools button:disabled { color: #6d7871; border-color: #d7dfd3; cursor: default; }
.lys-reading-tools p { flex-basis: 100%; margin: 0; color: #4d7265; font-size: .875rem; line-height: 1.7; }
.lys-reader-content { box-sizing: border-box; padding-inline-start: 52px; }
.lys-reader-target { position: relative; scroll-margin-block-start: 6rem; }
.lys-reader-marker { position: absolute; inset-inline-start: -52px; inset-block-start: -.3rem; display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #183b38; cursor: pointer; opacity: 0; line-height: 1; }
.lys-reader-marker svg { display: block; width: 42px; height: 35px; overflow: visible; filter: drop-shadow(0 2px 1px #183b381c); }
.lys-ribbon-tail { fill: #8cac90; }
.lys-ribbon-face { fill: #28644e; stroke: #183b38; stroke-width: .8; }
.lys-ribbon-seam { fill: none; stroke: #d6e7b8; stroke-width: .7; stroke-dasharray: 1.5 1; opacity: .8; }
.lys-ribbon-fold { fill: #183b38; }
.lys-reader-marker:focus-visible,
.lys-reader-marker[aria-pressed="true"] { opacity: 1; }
.lys-reader-saved > .lys-reader-marker svg { filter: drop-shadow(0 2px 2px #183b3833); }
.lys-reader-marker[aria-pressed="true"]::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #e4efbc; position: absolute; top: 20px; left: 17px; }
.lys-reader-toast { position: fixed; inset-inline: 1rem; inset-block-end: max(1.5rem, env(safe-area-inset-bottom)); z-index: 100; display: flex; align-items: center; gap: .85rem; box-sizing: border-box; width: max-content; max-width: calc(100% - 2rem); margin-inline: auto; padding: .65rem .9rem; border: 0; background: none; color: #183b38; box-shadow: none; font: 400 .95rem/1.7 system-ui, sans-serif; overflow-wrap: anywhere; pointer-events: none; opacity: 1; transition: opacity .25s ease; }
.lys-reader-toast > svg { display: block; flex: 0 0 42px; width: 42px; height: 35px; filter: drop-shadow(0 2px 1px #183b381c); }
.lys-reader-toast-copy { position: relative; display: block; min-width: 0; }
.lys-reader-toast-copy::before { content: ''; position: absolute; inset: -.9rem -1.4rem; z-index: -1; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask-image: radial-gradient(ellipse, #000 40%, transparent 75%); mask-image: radial-gradient(ellipse, #000 40%, transparent 75%); }
.lys-reader-toast-title { display: block; font: 600 1.1rem/1.65 'Hiragino Mincho ProN', 'Yu Mincho', serif; letter-spacing: .025em; text-shadow: 0 0 8px #fbfaf3b3; }
.lys-reader-toast-detail { display: block; margin-block-start: .2rem; color: #567365; font: 400 .75rem/1.65 system-ui, sans-serif; }
.lys-reader-toast[hidden] { display: none; }
.lys-reader-toast-fading { opacity: 0; }
.lys-reader-marker:focus-visible,
.lys-reading-tools button:focus-visible,
.lys-story-heading:focus-visible,
.lys-story-link:focus-visible { outline: 2px solid #28644e; outline-offset: 4px; }

.lys-stories { display: block; container-type: inline-size; color: #183b38; margin-block: 2rem; }
.lys-story-panel { min-width: 0; width: 100%; }
.lys-story-panel > h2 { font: 400 1.5rem/1.4 Georgia, 'Times New Roman', serif; margin: 0 0 1rem; }
.lys-story-heading { all: unset; display: inline-grid; align-items: center; box-sizing: border-box; max-width: 100%; min-height: 44px; font: inherit; cursor: pointer; overflow-wrap: anywhere; perspective: 450px; }
.lys-story-heading > span { grid-area: 1 / 1; backface-visibility: hidden; transform-origin: center; }
.lys-story-stage { display: grid; align-items: start; isolation: isolate; }
.lys-story-card { grid-area: 1 / 1; min-width: 0; min-height: 0; height: auto; margin: 0; opacity: 1; transition: opacity .9s ease; }
.lys-story-link { display: block; color: inherit; text-decoration: none; background: #eef1e8; border: 1px solid #d7dfd3; box-sizing: border-box; }
.lys-story-visual { display: block; width: 100%; min-width: 0; }
.lys-story-image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #e4eadc; }
.lys-story-placeholder { background: radial-gradient(ellipse at 65% 40%, #cbd9c0, transparent 55%), linear-gradient(135deg, #e9eddf, #d1e0d3); }
.lys-story-copy { padding: clamp(1rem, 3vw, 1.75rem); }
.lys-story-copy h3 { font-size: clamp(1.15rem, 2vw, 1.65rem); line-height: 1.65; min-height: 4.95em; margin: .5rem 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.lys-story-copy p { font-size: .95rem; color: #4d7265; line-height: 1.8; min-height: 3.6em; margin: .75rem 0 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.lys-story-date { display: block; min-height: 1.4em; font-size: .75rem; letter-spacing: .08em; color: #4d7265; }
.lys-story-link:hover h3 { text-decoration: underline; text-underline-offset: .2em; }
.lys-story-incoming { opacity: 0; z-index: 1; }
.lys-story-incoming.lys-story-visible { opacity: 1; }
.lys-story-outgoing { opacity: 0; pointer-events: none; }
.lys-story-empty { display: grid; align-items: center; min-height: 12rem; padding: 1.5rem; background: #eef1e8; color: #4d7265; border: 1px solid #d7dfd3; }

/* The one recommendation panel becomes a horizontal hero only when it fits.
   Article recommendation cards keep the stacked rules outside this container. */
.lys-stories .lys-story-copy h3 { min-height: 0; }
.lys-stories .lys-story-copy p { min-height: 0; }
.lys-stories .lys-story-copy p:empty { display: none; }
.lys-stories .lys-story-date:empty { display: none; }
@container (min-width: 640px) {
  .lys-stories .lys-story-link { display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); align-items: center; }
  .lys-stories .lys-story-image { min-width: 0; }
  .lys-stories .lys-story-copy { min-width: 0; padding: clamp(1.5rem, 3cqi, 2.5rem); }
  .lys-stories .lys-story-copy h3 { font-size: clamp(1.25rem, 2.3cqi, 1.85rem); line-height: 1.6; }
}
@media (min-width: 768px) {
  .lys-story-image { aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
  .lys-reader-content { padding-inline-start: 46px; }
  .lys-reader-marker { inset-inline-start: -46px; }
  .lys-reading-tools { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lys-story-card { transition: none; }
  .lys-reader-toast { transition: none; }
  .lys-reader-target { scroll-behavior: auto; }
}
@media print {
  .lys-reader, .lys-reader-marker { display: none !important; }
  .lys-reader-content { padding-inline-start: 0; }
}
