/* Webcomic-style reading: edge-to-edge pages, bars that get out of the way, likes and comments. */

/* Pages: one continuous strip, full width on phones, a centred column on large screens */
.reader-page{background:#0f0d12}
.reader-stream{max-width:800px}
.reader-sheet{margin:0!important;scroll-margin-top:0}
.sheet-art{background:#1b1820}
.reader-sheet figcaption,.reader-transcript{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.reader-intro.reader-intro-compact{padding:18px 16px 16px}

/* Bottom bar: like, comments, page, next story */
.social-bar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;align-items:center;gap:6px;max-width:800px;margin:auto;padding:8px max(12px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#17141cf2;backdrop-filter:blur(10px);border-top:1px solid #2f2936;color:#f6f1f8;transition:transform .22s ease}
.reader-bars-hidden:not(.reader-at-end) .social-bar{transform:translateY(110%)}
.social-bar button,.social-bar a{display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:0 12px;border:0;border-radius:999px;background:none;color:inherit;font:700 .95rem/1 inherit;text-decoration:none;cursor:pointer}
.social-bar .social-like.is-liked{color:#ff5c8a}
.social-page{margin-left:auto;font-size:.85rem;color:#b6a9c2;padding:0 8px}
.social-next{background:#bda1e2!important;color:#302344!important}
@media(prefers-reduced-motion:reduce){.social-bar{transition:none}}

/* End of the story */
.reader-end{padding-bottom:110px}
.end-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;margin:18px 0 34px}
.end-like{display:inline-flex;align-items:center;gap:10px;min-height:56px;padding:0 22px;border:2px solid #ff5c8a;border-radius:999px;background:transparent;color:#ffd6e3;font:800 1.05rem inherit;cursor:pointer}
.end-like .end-like-heart{font-size:1.5rem;line-height:1;color:#ff5c8a}
.end-like .end-like-count{padding:3px 9px;border-radius:999px;background:#ff5c8a33;font-size:.85rem}
.end-like.is-liked{background:#ff5c8a;color:#fff}
.end-like.is-liked .end-like-heart{color:#fff}
.end-like.is-liked .end-like-count{background:#ffffff33}
.end-share{min-height:56px;padding:0 20px;border:2px solid #4a4155;border-radius:999px;background:transparent;color:#e9e1ef;font:800 1rem inherit;cursor:pointer}
.end-share-status{flex-basis:100%;margin:0;min-height:1em;color:#b6a9c2;font-size:.9rem}
.pop{animation:like-pop .4s ease}
@keyframes like-pop{0%{transform:scale(1)}40%{transform:scale(1.18)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.pop{animation:none}}
.end-quiz-slot:empty{display:none}

/* Comments */
.story-comments{margin:40px auto 30px;max-width:640px;text-align:left}
.story-comments h2{font-size:1.4rem!important;letter-spacing:0!important;margin:0 0 14px}
.comment-count{display:inline-block;margin-left:4px;padding:2px 9px;border-radius:999px;background:#2b2531;color:#cdbfd8;font-size:.9rem;vertical-align:middle}
.comment-form{display:grid;gap:10px;padding:14px;border:1px solid #2f2936;border-radius:16px;background:#17141c}
.comment-form input,.comment-form textarea{width:100%;box-sizing:border-box;padding:12px 14px;border:1px solid #3a3342;border-radius:12px;background:#0f0d12;color:#f6f1f8;font:inherit;font-size:1rem}
.comment-form textarea{resize:vertical;min-height:84px}
.comment-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.comment-counter{font-size:.8rem;color:#8f8399}
.comment-post{min-height:44px;padding:0 22px;border:0;border-radius:999px;background:#bda1e2;color:#302344;font:800 1rem inherit;cursor:pointer}
.comment-post:disabled{opacity:.6;cursor:default}
.comment-note{margin:0;font-size:.8rem;color:#8f8399}
.comment-status{margin:0;min-height:1em;font-size:.9rem;color:#d7c9e2}
.comment-list{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:4px}
.comment{padding:14px 2px;border-bottom:1px solid #2a2430}
.comment-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 6px}
.comment-head strong{color:#f6f1f8}
.comment-date{font-size:.8rem;color:#8f8399}
.comment-pending{padding:2px 8px;border-radius:999px;background:#3a2f12;color:#f3d48a;font-size:.72rem;font-weight:700}
.comment-body{margin:0;color:#ddd3e5;line-height:1.55;overflow-wrap:anywhere;white-space:pre-line}
.comment.is-pending{opacity:.8}
.comment-empty{padding:16px 2px;color:#8f8399}

/* Next story card */
.reader-end .end-next{display:flex!important;flex-direction:column;align-items:flex-start;gap:4px;width:auto!important;max-width:640px;margin:24px auto 0!important;padding:18px 20px!important;border:0!important;border-radius:16px;background:#bda1e2;color:#302344!important;text-align:left;text-decoration:none}
.end-next-label{font-size:.75rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.8}
.end-next strong{font-size:1.3rem}
.end-next-go{font-weight:800}

/* End of the story, in the colours of the home page: a cream panel after the last page, Georgia titles,
   off-white cards with a dark outline and a solid 3D shadow, KOA purple as the accent. */
.reader-page .reader-end{max-width:none;margin:28px 0 0;padding:44px 18px 130px;border-radius:28px 28px 0 0;background:#faf5ea;color:#29202b}
.reader-page .reader-end>*{max-width:640px;margin-left:auto;margin-right:auto}
.reader-page .reader-end>p{color:#76518e;font-weight:900}
.reader-page .reader-end h2{font-family:Georgia,serif;font-weight:700;color:#29202b}
.reader-page .reader-end a{color:#76518e;border-bottom-color:#bda1e2}
.reader-page .reader-end .comic-rating [role=status]{color:#6f6170}
.reader-page .end-like,.reader-page .end-share{border:2px solid #3d3054;background:#fffdf9;box-shadow:0 4px 0 #3d3054;color:#29202b}
.reader-page .end-like .end-like-heart{color:#e0457b}
.reader-page .end-like .end-like-count{background:#efe6f7;color:#76518e}
.reader-page .end-like.is-liked{background:#ffe3ec;color:#29202b}.reader-page .end-like.is-liked .end-like-heart{color:#e0457b}
.reader-page .end-like:active,.reader-page .end-share:active{transform:translateY(3px);box-shadow:0 1px 0 #3d3054}
.reader-page .end-share-status{color:#6f6170}
.reader-page .comment-count{background:#efe6f7;color:#76518e}
.reader-page .comment-form{border:2px solid #3d3054;border-radius:18px;background:#fffdf9;box-shadow:0 4px 0 #3d3054}
.reader-page .comment-form input,.reader-page .comment-form textarea{border:1px solid #e2d6c6;background:#fff;color:#29202b}
.reader-page .comment-counter,.reader-page .comment-note,.reader-page .comment-date,.reader-page .comment-empty{color:#6f6170}
.reader-page .comment-status{color:#76518e}
.reader-page .comment-post{border:2px solid #3d3054;border-radius:16px;background:linear-gradient(180deg,#cdb4ec,#b48fe0);box-shadow:0 4px 0 #3d3054;color:#21162e}
.reader-page .comment{border-bottom-color:#e2d6c6}
.reader-page .comment-head strong{color:#29202b}
.reader-page .comment-body{color:#4a4058}
.reader-page .comment-pending{background:#fff1d6;color:#8a5d10}
.reader-page .reader-end .end-next{border:2px solid #3d3054!important;border-radius:18px;background:#fffdf9;box-shadow:0 5px 0 #3d3054;color:#29202b!important}
.reader-page .end-next-label{color:#76518e;opacity:1}
.reader-page .end-next strong{font-family:Georgia,serif;color:#29202b}
.reader-page .end-next-go{color:#76518e}

/* No focus frame on the speech bubbles when they are clicked or tapped; a soft lavender one for the keyboard */
.sheet-lettering [tabindex]:focus{outline:none}
.sheet-lettering [tabindex]:focus-visible{outline:3px solid #bda1e2;outline-offset:4px;border-radius:12px}
.sheet-lettering,.sheet-lettering *{-webkit-tap-highlight-color:transparent}
/* Back to the top: always visible at the bottom right, above the bottom bar (lower when the bar is hidden) */
.reader-to-top{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:calc(74px + env(safe-area-inset-bottom));z-index:31;display:grid;place-items:center;width:48px;height:48px;padding:0;border:2px solid #3d3054;border-radius:50%;background:#fffdf9;box-shadow:0 4px 0 #3d3054;color:#29202b;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:bottom .22s ease,transform .08s}
.reader-to-top svg{width:22px;height:22px}
.reader-to-top:hover{background:#fff}
.reader-to-top:active{transform:translateY(3px);box-shadow:0 1px 0 #3d3054}
.reader-to-top:focus:not(:focus-visible){outline:none}
.reader-to-top:focus-visible{outline:3px solid #bda1e2;outline-offset:3px}
.reader-bars-hidden:not(.reader-at-end) .reader-to-top{bottom:calc(18px + env(safe-area-inset-bottom))}
@media(prefers-reduced-motion:reduce){.reader-to-top{transition:none}}

/* Next story card with its cover (end of the page) */
.reader-page .reader-end .end-next{flex-direction:row!important;align-items:center;gap:14px;text-decoration:none}
.end-next-cover{flex:none;width:72px;height:108px;object-fit:cover;border-radius:10px;box-shadow:0 0 0 1px #29202b14,0 4px 12px #29202b2e}
.end-next-text{display:grid;gap:4px;min-width:0}
.end-next-meta{display:flex;gap:6px}
.end-next-hook{color:#6f6170;font-size:.88rem;line-height:1.4}
/* The stars stay clear of the "back to the top" button on phones. */
@media(max-width:480px){.reader-page .comic-rating>div:not([role]){display:flex;justify-content:center;gap:0}.reader-page .comic-rating button{width:42px}}


/* Vertical comics read on deep black, like premium comic apps: the page around the strip matches its gutters. */
.reader-page:has(.reader-vertical){background:#000}
/* Reading bar: a house to go back home (13/11) */
.social-bar .social-home{padding:0 10px}
.social-home svg{width:24px;height:24px}
/* Next story card: a real button inside it, so it is clear where to tap (13/11) */
.reader-page .reader-end .end-next-button{display:inline-flex;align-items:center;justify-content:center;margin-top:8px;min-height:46px;padding:0 18px;border:2px solid #3d3054;border-radius:14px;background:linear-gradient(180deg,#cdb4ec,#b48fe0);box-shadow:0 3px 0 #3d3054;color:#302344;font-weight:900}
/* 15/11: the reading position once, in the bottom bar (the toolbar at the top no longer repeats it). */
.reader-navigation #reader-position{display:none}
