/* ==========================================================================
   YanisWrites — Ghost theme, in the prantas.com visual language:
   warm paper, thick ink outlines, hard offset shadows, pill shapes,
   papaya / petrol / violet / pink / lime, Bricolage Grotesque + Inter.
   ========================================================================== */

:root {
    --ink: #1b1536;
    --ink-soft: #4a4568;
    --paper: #fff8ee;
    --paper-2: #ffefd9;
    --papaya: #ff8a00;
    --petrol: #22c7d8;
    --violet: #7b5cff;
    --pink: #ff5c93;
    --lime: #b6e84a;
    --radius: 28px;
    --display: 'Bricolage Grotesque', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;

    /* theme options (Settings → Design) override these from default.hbs */
    --accent: var(--papaya);
    --accent-2: var(--pink);

    --max-width: 1100px;
    --content-width: 700px;
    --header-h: 4.5rem;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }
body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* transparent so .yw-bg shows through in the margins around content */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--body); font-weight: 600; }

/* ---- animated background: flat Prantas blobs drifting + morphing.
   Sits under .yw-site (z-index 1); cards are opaque so the blobs only
   show in the margins and gaps. ---- */
.yw-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
.yw-bokeh {
    position: absolute;
    filter: blur(2px);
    animation: yw-bokeh-float var(--yw-bokeh-dur, 20s) ease-in-out infinite var(--yw-bokeh-delay, 0s),
               yw-bokeh-morph calc(var(--yw-bokeh-dur, 20s) * 1.3) ease-in-out infinite var(--yw-bokeh-delay, 0s);
    will-change: transform, opacity, border-radius;
}
@keyframes yw-bokeh-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: var(--yw-bokeh-o, 0.45); }
    50% { transform: translate(var(--yw-bokeh-dx, 20px), var(--yw-bokeh-dy, -26px)) scale(1.1); opacity: calc(var(--yw-bokeh-o, 0.45) * 0.75); }
}
@keyframes yw-bokeh-morph {
    0%, 100% { border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%; }
    33% { border-radius: 40% 60% 35% 65% / 55% 40% 60% 45%; }
    66% { border-radius: 50% 50% 38% 62% / 38% 62% 38% 62%; }
}
.yw-bokeh--1 { top: 6%;  left: 4%;  width: 220px; height: 220px; background: var(--papaya); --yw-bokeh-o: 0.55; --yw-bokeh-dx: 30px;  --yw-bokeh-dy: -34px; --yw-bokeh-dur: 20s; --yw-bokeh-delay: -2s; }
.yw-bokeh--2 { top: 12%; left: 76%; width: 260px; height: 260px; background: var(--pink);   --yw-bokeh-o: 0.5;  --yw-bokeh-dx: -36px; --yw-bokeh-dy: 26px;  --yw-bokeh-dur: 26s; --yw-bokeh-delay: -9s; }
.yw-bokeh--3 { top: 52%; left: 88%; width: 170px; height: 170px; background: var(--petrol); --yw-bokeh-o: 0.55; --yw-bokeh-dx: 22px;  --yw-bokeh-dy: 30px;  --yw-bokeh-dur: 17s; --yw-bokeh-delay: -4s; }
.yw-bokeh--4 { top: 68%; left: 2%;  width: 300px; height: 300px; background: var(--violet); --yw-bokeh-o: 0.4;  --yw-bokeh-dx: -32px; --yw-bokeh-dy: -22px; --yw-bokeh-dur: 32s; --yw-bokeh-delay: -14s; }
.yw-bokeh--5 { top: 32%; left: 46%; width: 110px; height: 110px; background: var(--lime);   --yw-bokeh-o: 0.5;  --yw-bokeh-dx: 18px;  --yw-bokeh-dy: 24px;  --yw-bokeh-dur: 15s; --yw-bokeh-delay: -6s; }
.yw-bokeh--6 { top: 82%; left: 66%; width: 220px; height: 220px; background: var(--papaya); --yw-bokeh-o: 0.45; --yw-bokeh-dx: -24px; --yw-bokeh-dy: -28px; --yw-bokeh-dur: 28s; --yw-bokeh-delay: -11s; }
.yw-bokeh--7 { top: 2%;  left: 46%; width: 90px;  height: 90px;  background: var(--petrol); --yw-bokeh-o: 0.5;  --yw-bokeh-dx: 14px;  --yw-bokeh-dy: 18px;  --yw-bokeh-dur: 13s; --yw-bokeh-delay: -3s; }
.yw-bokeh--8 { top: 44%; left: 0%;  width: 130px; height: 130px; background: var(--pink);   --yw-bokeh-o: 0.4;  --yw-bokeh-dx: -18px; --yw-bokeh-dy: 26px;  --yw-bokeh-dur: 22s; --yw-bokeh-delay: -8s; }
.yw-bokeh--9 { top: 90%; left: 30%; width: 240px; height: 240px; background: var(--lime);   --yw-bokeh-o: 0.45; --yw-bokeh-dx: 26px;  --yw-bokeh-dy: -22px; --yw-bokeh-dur: 30s; --yw-bokeh-delay: -16s; }
@media (prefers-reduced-motion: reduce) {
    .yw-bokeh { animation: none; opacity: var(--yw-bokeh-o, 0.45); border-radius: 50%; }
}

.yw-site {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.yw-accent { color: var(--accent); }

.yw-cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: currentColor;
    vertical-align: middle;
    margin-left: 4px;
    animation: yw-blink 1s step-end infinite;
}
@keyframes yw-blink { 50% { opacity: 0; } }

.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--ink); color: #fff; padding: 0.5rem 1rem; border-radius: 999px; z-index: 300; }
.skip-link:focus { left: 0.5rem; }

/* ---- header: floating pill nav ---- */
.yw-header {
    position: sticky;
    top: 0.75rem;
    z-index: 100;
    margin: 0.75rem 1.25rem 0;
}
.yw-header-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem 0.55rem 1.1rem;
    background: rgba(255, 248, 238, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 4px 4px 0 var(--ink);
}
.yw-menubar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.yw-menubar-mark {
    width: 1.8rem;
    height: 1.8rem;
    background: var(--accent);
    -webkit-mask: url('../img/logo.2021.png') center / contain no-repeat;
    mask: url('../img/logo.2021.png') center / contain no-repeat;
    transition: transform 0.6s cubic-bezier(.3, 1.6, .5, 1);
}
.yw-menubar-brand:hover .yw-menubar-mark { transform: rotate(180deg); }

.yw-nav { display: flex; align-items: center; justify-content: flex-end; flex: 1; min-width: 0; }
.yw-menubar-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0 0.6rem 0 0;
    padding: 0;
}
.yw-menubar-item {
    position: relative;
    display: inline-block;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}
.yw-menubar-list .yw-menubar-item::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 3px;
    border-radius: 3px;
    background: var(--petrol);
    transform: scaleX(0);
    transition: transform 0.25s;
}
.yw-menubar-list .yw-menubar-item:hover::after,
.yw-menubar-list .yw-menubar-item[aria-current="page"]::after { transform: scaleX(1); }

/* Subscribe / Account: the .btn--small of the nav */
.yw-menubar-item--accent {
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--accent);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
}
.yw-menubar-item--accent:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.yw-menubar-item--accent:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.yw-header-account {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.yw-header-account-icon { display: none; align-items: center; justify-content: center; }

.yw-nav-toggle {
    display: none;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
    width: 40px;
    height: 36px;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}
.yw-nav-toggle span { width: 16px; height: 2px; background: var(--ink); display: block; border-radius: 2px; }

/* ---- main / layout ---- */
.yw-main { padding: 0 1.25rem 140px; }

/* ---- tags: Prantas .venture-tag pills ---- */
.yw-tag-badge {
    display: inline-flex;
    width: fit-content;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    color: currentColor;
    border: 2px solid currentColor;
    border-radius: 999px;
    padding: 0.1rem 0.8rem;
}
.yw-tag-badge--featured { background: var(--lime); color: var(--ink); border-color: var(--ink); }
.yw-tag-badge--members { background: var(--pink); color: #fff; border-color: var(--ink); }
.yw-open-link { font-weight: 700; margin-top: 6px; display: inline-block; }
.yw-open-link:hover { text-decoration: underline; }

/* ---- post log: stacked cards ---- */
.yw-log { max-width: var(--content-width); margin: 0 auto; padding: 56px 0 40px 0; }

.yw-post-window {
    --c: var(--papaya);
    --c-ink: var(--ink);
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    background: var(--c);
    color: var(--c-ink);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 6px 6px 0 var(--ink);
    transition: box-shadow 0.2s;
}
.yw-post-window:hover { box-shadow: 10px 10px 0 var(--ink); }

/* rotate the card colour like the Prantas venture cards */
.yw-post-window:nth-of-type(5n + 2) { --c: var(--petrol); }
.yw-post-window:nth-of-type(5n + 3) { --c: var(--violet); --c-ink: #fff; }
.yw-post-window:nth-of-type(5n + 4) { --c: var(--pink);   --c-ink: #fff; }
.yw-post-window:nth-of-type(5n + 5) { --c: var(--lime); }

/* members-only posts go ink-dark, like .venture--ink */
.yw-post-window--members { --c: var(--ink) !important; --c-ink: var(--paper) !important; }

.yw-post-window-titlebar {
    background: var(--paper);
    color: var(--ink);
    padding: 0.6rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--ink);
}
.yw-post-window-dots { display: flex; gap: 7px; flex-shrink: 0; }
.yw-post-window-dots span { width: 12px; height: 12px; border-radius: 50%; display: block; border: 2px solid var(--ink); }
.yw-post-window-dots span:nth-child(1) { background: var(--pink); }
.yw-post-window-dots span:nth-child(2) { background: var(--papaya); }
.yw-post-window-dots span:nth-child(3) { background: var(--lime); }
.yw-post-window-titlebar-tags {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.yw-post-window-link {
    display: flex;
    align-items: stretch;
}
.yw-post-window-media {
    width: 240px;
    flex-shrink: 0;
    border-right: 2px solid var(--ink);
    overflow: hidden;
}
.yw-post-window-media img { width: 100%; height: 100%; object-fit: cover; }
.yw-post-window-content {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 4rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.yw-post-window-title {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}
.yw-post-window-excerpt { margin: 0; font-size: 1rem; line-height: 1.6; opacity: 0.85; max-width: 640px; }
.yw-post-window-meta { font-size: 0.85rem; font-weight: 600; opacity: 0.8; }

/* round arrow button, like .venture-go */
.yw-post-window-cta {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    z-index: 2;
    transition: transform 0.15s, box-shadow 0.15s;
}
.yw-post-window-cta svg { stroke-width: 3; transition: transform 0.15s; }
.yw-post-window-cta:hover,
.yw-post-window-cta:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.yw-post-window-cta:hover svg { transform: translateX(2px); }
.yw-post-window-cta:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.yw-post-window--members .yw-post-window-cta { background: var(--accent); border-color: var(--paper); box-shadow: 3px 3px 0 var(--paper); }

/* ---- infinite scroll status ---- */
.yw-infinite-status {
    text-align: center;
    font-size: 0.9rem;
    color: var(--ink-soft);
    padding: 24px 0 8px 0;
}
.yw-infinite-status::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--ink);
    animation: yw-blink 1s step-end infinite;
    vertical-align: middle;
}

/* there is no <footer> — assets/js/dock.js watches this 1px sentinel
   (the true end of the page) to decide when to reveal the dock */
#yw-bottom-sentinel { height: 1px; margin-top: auto; }

/* ---- dock: the footer. Slides up at the end of the page (dock.js). Ink
   pill with the copyright on the left and round social buttons. ---- */
.yw-dock {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.7rem 1rem 0.7rem 1.4rem;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--paper);
    border-radius: 999px;
    box-shadow: 4px 4px 0 var(--papaya);
    transform: translate(-50%, 160%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.yw-dock--visible {
    transform: translate(-50%, -16px);
    pointer-events: auto;
}
.yw-dock-copy {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 248, 238, 0.75);
    white-space: nowrap;
}
.yw-dock-copy a { color: var(--paper); font-weight: 700; text-decoration: none; }
.yw-dock-copy a:hover { color: var(--petrol); }
.yw-dock-sep {
    align-self: stretch;
    width: 2px;
    border-radius: 1px;
    background: rgba(255, 248, 238, 0.35);
    margin: 2px 0;
}
.yw-dock-icon {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--paper);
    box-shadow: 3px 3px 0 rgba(255, 248, 238, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
}
.yw-dock-icon:hover,
.yw-dock-icon:focus-visible {
    transform: translate(-2px, -4px) rotate(-6deg);
    box-shadow: 5px 5px 0 rgba(255, 248, 238, 0.35);
}
.yw-dock-icon--instagram { background: var(--pink); }
.yw-dock-icon--youtube { background: var(--papaya); }
.yw-dock-icon--tiktok { background: var(--petrol); }
.yw-dock-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-bottom: 12px;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}
.yw-dock-icon:hover .yw-dock-tooltip,
.yw-dock-icon:focus-visible .yw-dock-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
    .yw-dock, .yw-dock-icon, .yw-dock-tooltip { transition: none; }
}

/* ---- single post ---- */
.yw-post-main { padding-top: 40px; }

.yw-post-window-frame {
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 6px 6px 0 var(--ink);
    margin-bottom: 40px;
}
.yw-post-window-frame--featured { box-shadow: 6px 6px 0 var(--lime), 6px 6px 0 2px var(--ink); }
.yw-post-window-frame--members { box-shadow: 6px 6px 0 var(--pink), 6px 6px 0 2px var(--ink); }
.yw-post-window-frame-body { padding: 0 1.5rem 0.5rem; }

.yw-post-header {
    padding: 56px 0 32px 0;
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.yw-post-title-lg {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.02em;
}
.yw-post-title-lg .yw-accent { display: none; }
.yw-post-lede { margin: 0; font-size: 1.25rem; color: var(--ink-soft); line-height: 1.6; }
.yw-post-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.9rem; color: var(--ink-soft); margin-top: 4px; }
.yw-avatar-fallback {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--petrol);
    color: var(--ink);
    border: 2px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
}
.yw-avatar-fallback img { width: 100%; height: 100%; object-fit: cover; }

.yw-post-feature {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 8px 0;
}
.yw-post-feature img { border-radius: 20px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); width: 100%; }
.yw-post-feature figcaption { margin-top: 14px; font-size: 0.85rem; color: var(--ink-soft); text-align: center; }

.yw-post-content {
    max-width: var(--content-width);
    margin: 48px auto 0 auto;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--ink);
}
.yw-post-content p { margin: 0 0 24px 0; }
.yw-post-content h1, .yw-post-content h2, .yw-post-content h3 {
    font-family: var(--display);
    color: var(--ink);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 48px 0 16px 0;
}
.yw-post-content h1 { font-size: 2.4rem; }
.yw-post-content h2 { font-size: 1.9rem; }
.yw-post-content h3 { font-size: 1.5rem; }
.yw-post-content a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}
.yw-post-content a:hover { background: var(--accent); }
.yw-post-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--paper-2);
    border: 2px solid var(--ink);
    padding: 1px 8px;
    border-radius: 8px;
    font-size: 0.9em;
}
.yw-post-content pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 20px;
    box-shadow: 4px 4px 0 var(--petrol);
    padding: 24px 28px;
    overflow-x: auto;
    line-height: 1.8;
}
.yw-post-content pre code { background: none; border: none; padding: 0; color: inherit; }
.yw-post-content img { border-radius: 20px; border: 2px solid var(--ink); margin: 36px 0; }
.yw-post-content figure { margin: 36px 0; }
.yw-post-content figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--ink-soft); text-align: center; }
.yw-post-content blockquote {
    margin: 40px 0;
    padding: 18px 24px;
    border: 2px solid var(--ink);
    border-left-width: 8px;
    border-left-color: var(--accent);
    border-radius: 20px;
    background: var(--paper-2);
    color: var(--ink);
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.5;
}
.yw-post-content blockquote p { margin: 0; }
.yw-post-content ul, .yw-post-content ol { padding-left: 24px; }
.yw-post-content hr { border: none; border-top: 2px solid var(--ink); margin: 48px 0; }

/* Koenig editor width classes */
.yw-post-content .kg-width-wide {
    width: 900px;
    max-width: 900px;
    position: relative;
    left: 50%;
    margin-left: -450px;
}
.yw-post-content .kg-width-full {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

.yw-post-content .kg-gallery-card img,
.yw-post-content .kg-image-card img {
    cursor: zoom-in;
    transition: transform 0.15s ease;
}
.yw-post-content .kg-gallery-card img:hover,
.yw-post-content .kg-image-card img:hover { transform: translate(-2px, -2px); }

/* ---- photo viewer (assets/js/photo-viewer.js) — reuses the card
   titlebar/dots; red and green dots are real buttons here. ---- */
html.yw-lightbox-locked { overflow: hidden; }
.yw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}
.yw-lightbox--open { display: flex; }
.yw-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(27, 21, 54, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.yw-lightbox-window {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(92vw, 1100px);
    height: auto;
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 8px 8px 0 var(--ink);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.yw-lightbox-window--maximized {
    width: 96vw;
    height: 94vh;
    max-width: 96vw;
    max-height: 94vh;
}
.yw-lightbox-window--maximized .yw-lightbox-image { max-height: 82vh; }
.yw-lightbox-titlebar { flex-shrink: 0; }
.yw-lightbox-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid var(--ink);
    border-radius: 50%;
    cursor: pointer;
}
.yw-lightbox-dot--close { background: var(--pink); }
.yw-lightbox-dot--close:hover,
.yw-lightbox-dot--close:focus-visible { background: #ff8fb2; }
.yw-lightbox-dot--maximize { background: var(--lime); }
.yw-lightbox-dot--maximize:hover,
.yw-lightbox-dot--maximize:focus-visible { background: #cdf27a; }
.yw-lightbox-tool {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}
.yw-lightbox-tool:hover,
.yw-lightbox-tool:focus-visible { background: var(--petrol); border-color: var(--ink); }
.yw-lightbox-tool[aria-expanded="true"] { background: var(--papaya); border-color: var(--ink); }

.yw-lightbox-info {
    position: absolute;
    top: 54px;
    right: 10px;
    width: 250px;
    max-width: calc(100% - 20px);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 20px;
    padding: 6px 14px;
    box-shadow: 4px 4px 0 var(--ink);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}
.yw-lightbox-info--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.yw-lightbox-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.8rem;
    padding: 8px 0;
    border-bottom: 2px solid rgba(27, 21, 54, 0.12);
    color: var(--ink);
}
.yw-lightbox-info-row:last-child { border-bottom: none; }
.yw-lightbox-info-label {
    color: var(--ink-soft);
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.yw-lightbox-info-value { text-align: right; word-break: break-word; }
.yw-lightbox-info-row--loading { color: var(--ink-soft); font-size: 0.7rem; justify-content: flex-start; }
@media (prefers-reduced-motion: reduce) {
    .yw-lightbox-info { transition: none; }
}

.yw-lightbox-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--paper-2);
    /* allow native panning but leave pinch-zoom to our JS */
    touch-action: pan-x pan-y;
}
.yw-lightbox-image {
    max-width: 100%;
    max-height: 76vh;
    border-radius: 12px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    cursor: grab;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}
.yw-lightbox-image--dragging {
    cursor: grabbing;
    transition: none;
}
.yw-post-content .yw-lightbox-image { border: 0; margin: 0; }
@media (prefers-reduced-motion: reduce) {
    .yw-lightbox-image, .yw-lightbox-window { transition: none; }
}

.yw-post-tags {
    max-width: var(--content-width);
    margin: 40px auto 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.yw-tag-chip {
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid var(--ink);
    color: var(--ink);
    padding: 0.1rem 0.8rem;
    border-radius: 999px;
    transition: background 0.15s;
}
.yw-tag-chip:hover { background: var(--petrol); }

/* ---- sub-windows: Comments ---- */
.yw-post-window-titlebar-label {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.yw-post-window-titlebar-spacer { width: 47px; flex-shrink: 0; }
.yw-subwindow-body {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 32px 24px;
}

/* ---- subscribe: Prantas .cta block ---- */
.yw-subscribe-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    max-width: var(--content-width);
    margin: 48px auto 40px auto;
    border-radius: 36px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: var(--ink);
    color: var(--paper);
}
.yw-subscribe-cta::before, .yw-subscribe-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
}
.yw-subscribe-cta::before { width: 160px; height: 160px; background: var(--violet); left: -50px; top: -50px; }
.yw-subscribe-cta::after { width: 180px; height: 180px; background: var(--papaya); right: -60px; bottom: -70px; }
.yw-cta-prompt { font-family: var(--display); font-size: clamp(1.4rem, 4vw, 2rem); color: var(--paper); font-weight: 800; letter-spacing: -0.02em; word-break: break-word; }
.yw-subscribe-cta p { margin: 0; opacity: 0.8; font-size: 1rem; max-width: 400px; }
.yw-subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.yw-subscribe-form input {
    background: var(--paper);
    border: 2px solid var(--paper);
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    min-width: 240px;
}
.yw-subscribe-form input:focus-visible { outline-color: var(--petrol); }
.yw-subscribe-form button {
    background: var(--accent);
    color: var(--ink);
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    border: 2px solid var(--paper);
    box-shadow: 4px 4px 0 var(--papaya);
    transition: transform 0.15s, box-shadow 0.15s;
}
.yw-subscribe-form button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--papaya); }
.yw-subscribe-form button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--papaya); }
.yw-form-error { color: var(--pink); font-size: 0.85rem; width: 100%; margin: 0; }

/* ---- related posts: label above full post cards ---- */
.yw-related-section { margin-top: 8px; }
.yw-related-heading-glass {
    display: inline-block;
    margin-bottom: 24px;
    padding: 0.3rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violet);
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--ink);
}

/* ---- error page ---- */
.yw-error { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding-top: 64px; padding-bottom: 64px; }
.yw-error-card { text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.yw-error-code {
    font-family: var(--display);
    font-size: clamp(5rem, 20vw, 11rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(100deg, var(--papaya), var(--pink), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.yw-error-msg { font-size: 1.05rem; color: var(--ink); margin: 0; word-break: break-word; }
.yw-error-copy { color: var(--ink-soft); margin: 0; max-width: 420px; }
.yw-error .yw-open-link {
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    background: var(--accent);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
}
.yw-error .yw-open-link:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; }

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 900px) {
    .yw-nav-toggle { display: flex; }
    .yw-nav {
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        background: var(--paper);
        border: 2px solid var(--ink);
        border-radius: var(--radius);
        box-shadow: 6px 6px 0 var(--ink);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem;
        display: none;
        z-index: 10;
    }
    .yw-nav.yw-nav--open { display: flex; }
    .yw-menubar-list { flex-direction: column; align-items: stretch; gap: 0.25rem; margin: 0; }
    .yw-menubar-list .yw-menubar-item { display: block; padding: 0.6rem 0.25rem; font-size: 1.05rem; }
    .yw-menubar-list .yw-menubar-item::after { display: none; }

    /* the nav collapses out of flow, so push account + toggle right
       explicitly and swap the text link for an icon-only button */
    .yw-header-account {
        margin-left: auto;
        padding: 0;
        width: 40px;
        height: 36px;
        justify-content: center;
    }
    .yw-header-account-text { display: none; }
    .yw-header-account-icon { display: inline-flex; }
    .yw-nav-toggle { margin-left: 0; }

    .yw-post-window-link { flex-direction: column; }
    .yw-post-window-media { width: 100%; height: 180px; border-right: none; border-bottom: 2px solid var(--ink); }
    .yw-post-window-content { padding: 1.4rem 4rem 1.4rem 1.4rem; }
}

@media (max-width: 960px) {
    .yw-post-content .kg-width-wide {
        width: 100%;
        max-width: 100%;
        position: static;
        left: auto;
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .yw-main { padding-left: 0.75rem; padding-right: 0.75rem; }
    .yw-header { margin-left: 0.75rem; margin-right: 0.75rem; }
    .yw-post-window-frame-body { padding: 0 1rem 0.5rem; }
    .yw-dock { gap: 10px; padding: 0.55rem 0.8rem 0.55rem 1rem; max-width: calc(100vw - 1.5rem); }
    .yw-dock-icon { width: 2.4rem; height: 2.4rem; }
    .yw-dock-copy { font-size: 0.75rem; flex-direction: column; gap: 0; }
}

/* ---- honour reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
