.konosuba-page {
    --k-ink: #272344;
    --k-pink: #f74379;
    --k-orange: #f87829;
    color: var(--k-ink);
    background: #fffaf2;
    font-family: "Noto Sans Thai", "Inter", sans-serif;
    font-size: 17px;
    line-height: 1.75;
}
.konosuba-page::before { display: none; }
.konosuba-page .mod-main,
.konosuba-page .mod-footer { width: min(1280px, calc(100% - 64px)); }
.konosuba-page .mod-main { padding-top: 136px; }
.konosuba-page .breadcrumb { color: #77718b; font-weight: 700; margin-bottom: 24px; }
.konosuba-page .breadcrumb a:hover { color: var(--k-pink); }
.konosuba-page .eyebrow { color: var(--k-pink); font: 700 .78rem/1.6 "Fredoka", "Noto Sans Thai", sans-serif; letter-spacing: .16em; }
.konosuba-page .mod-nav-links .nav-active { background: linear-gradient(135deg, #ff5b8e, #ee3e74); }
.konosuba-page a:focus-visible,
.konosuba-page button:focus-visible { outline-color: var(--k-pink); }

/* Comic book hero */
.k-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 55%) minmax(0, 45%);
    align-items: center;
    min-height: 590px;
    padding: 48px 5.8%;
    margin-bottom: 22px;
    border-radius: 28px;
    background: radial-gradient(circle at 82% 24%, #fff6c9 0 20%, transparent 42%), linear-gradient(135deg, #ddf8ff, #fff3cb 72%);
}
.k-hero::before { content: ""; position: absolute; width: 390px; height: 390px; right: -70px; bottom: -126px; border-radius: 50%; background: #ffb9d1; opacity: .68; }
.k-hero::after { content: "✦"; position: absolute; top: -94px; left: 45%; font-size: 135px; color: #ffc342; }
.k-hero > * { position: relative; z-index: 1; min-width: 0; }
.k-hero h1 { color: var(--k-ink); font-family: "Noto Sans JP", sans-serif; font-size: clamp(3.2rem, 4.6vw, 4rem); line-height: 1.2; letter-spacing: -.055em; font-weight: 900; overflow-wrap: anywhere; margin: 12px 0 18px; }
.k-hero h1 span { display: block; }
.k-hero h1 span:last-child { color: var(--k-pink); }
.k-english { color: var(--k-orange); font: 700 1.4rem/1.25 "Fredoka", sans-serif; }
.k-lead { max-width: 540px; font-size: 1.15rem; line-height: 1.85; margin: 20px 0 0; }
.k-hero .tags { margin-top: 23px; }
.k-hero .tag { padding: 7px 14px; font-size: .8rem; font-weight: 700; background: white; color: var(--k-ink); box-shadow: 0 2px 0 #dfb99e; }
.k-hero .hero-actions { margin-top: 27px; }
.k-hero .button,
.k-download .button { background: var(--k-pink); color: white; border: 0; box-shadow: 5px 6px 0 #762f62; font-weight: 800; }
.k-hero .button-outline { background: white; color: var(--k-ink); border: 2px solid var(--k-ink); box-shadow: 5px 6px 0 #beeafa; }
.k-hero-art { height: 500px; }
.k-cover { position: absolute; top: 26px; left: calc(50% - 143px); width: 287px; height: 445px; object-fit: cover; border: 10px solid white; border-radius: 8px; box-shadow: 0 25px 50px #33203955; transform: rotate(7deg); }
.k-speech { position: absolute; z-index: 2; right: 0; top: 12px; padding: 11px 19px; background: white; border: 2px solid var(--k-ink); border-radius: 30px; box-shadow: 6px 7px 0 var(--k-ink); font-weight: 800; transform: rotate(8deg); }
.k-spark { position: absolute; z-index: 2; color: #ff8c28; font-size: 46px; }
.k-spark-one { left: 4%; top: 9%; }
.k-spark-two { right: 6%; bottom: 9%; }

/* Chapter navigation and shared headings */
.konosuba-page .chapter-nav { width: min(100%, 1120px); margin-bottom: 60px; padding: 5px 12px; gap: 3px; background: white; border: 2px solid #f7d6c8; border-radius: 20px; box-shadow: 0 8px 0 #ffe8bd; }
.konosuba-page .chapter-nav a { color: var(--k-ink); font-weight: 800; padding: 10px 16px; }
.konosuba-page .chapter-nav a:hover,
.konosuba-page .chapter-nav a[aria-current] { color: var(--k-pink); border-bottom-color: var(--k-pink); }
.konosuba-page .k-section { margin-bottom: 70px; scroll-margin-top: 190px; }
.k-heading { margin-bottom: 27px; }
.k-heading h2 { color: var(--k-ink); font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1.3; letter-spacing: -.035em; font-weight: 800; margin: 5px 0 6px; }
.k-heading > p:last-child { color: #726d83; }
.k-story-intro { max-width: 1050px; font-size: 1.15rem; margin-bottom: 28px; }

/* Story cards */
.k-story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.k-story-card { min-width: 0; overflow: hidden; background: white; border: 2px solid #f4e3d6; border-radius: 23px; box-shadow: 0 9px 0 #fae9d4; }
.k-story-card:nth-child(1) { border-color: #ffcb7a; }
.k-story-card:nth-child(2) { border-color: #ffb4d2; }
.k-story-card:nth-child(3) { border-color: #94e3f1; }
.k-story-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.k-story-copy { padding: 23px 24px 26px; }
.k-story-copy > span { color: var(--k-pink); font: 700 .8rem/1.4 "Fredoka", sans-serif; letter-spacing: .08em; }
.k-story-copy h3 { color: var(--k-ink); font-size: 1.35rem; margin: 8px 0; }
.k-story-copy p { font-size: 1.06rem; line-height: 1.75; }

/* Seven characters */
.k-characters { padding: 38px; border-radius: 28px; background: #e7f7fd; }
.k-character-intro { max-width: 850px; font-size: 1.08rem; margin: -6px 0 24px; }
.k-character-grid { display: grid; gap: 19px; }
.k-character-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k-character-secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.k-character-card { min-width: 0; overflow: hidden; background: white; border-radius: 20px; box-shadow: 0 6px 0 #b9e7ee; }
.k-character-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.k-character-card > div { padding: 18px 20px 21px; }
.k-character-card h3 { color: var(--k-ink); font-size: 1.23rem; line-height: 1.35; }
.k-character-card p { font-size: 1.06rem; line-height: 1.72; margin-top: 6px; }
.k-character-secondary .k-character-card h3 { font-size: 1.1rem; }
.k-character-subheading { color: var(--k-ink); font-size: 1.4rem; margin: 30px 0 13px; }
.k-cast-banner { display: grid; grid-template-columns: 35% 65%; overflow: hidden; margin-top: 26px; background: white; border: 2px solid #ffc2d7; border-radius: 22px; box-shadow: 0 7px 0 #c8eaf0; }
.k-cast-banner > div { display: flex; flex-direction: column; justify-content: center; padding: 28px; }
.k-cast-banner h3 { color: var(--k-ink); font-size: 1.65rem; line-height: 1.3; margin: 6px 0 10px; }
.k-cast-banner p:last-child { font-size: 1.06rem; }
.k-cast-banner img { width: 100%; height: 410px; object-fit: cover; object-position: center; }

/* Screenshots, with the shared lightbox behavior */
.konosuba-page .screenshot-album { border-color: #f7d6c8; background: #fffdf9; box-shadow: 0 8px 0 #f8eacb; }
.k-shot-track { scrollbar-color: #f5a9c3 #fff0de; }
.k-shot-track .screenshot-item { flex-basis: 400px; }
.k-shot-track .screenshot-card { overflow: hidden; padding: 0; border: 2px solid #eee0cf; border-radius: 19px; }
.k-shot-track .screenshot-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; }
.k-shot-track .screenshot-caption { color: var(--k-ink); padding: 11px 18px; font-size: 1rem; font-weight: 700; }
.k-shot-track .screenshot-caption > :last-child { color: var(--k-pink); white-space: nowrap; }
.konosuba-page .album-footer p { color: #70677e; }
.konosuba-page .album-controls[hidden] { display: none; }
.konosuba-page .gallery-button { border-color: #f5bed2; color: var(--k-pink); }
.konosuba-page .gallery-button:hover:not(:disabled) { background: #fff0f5; }
.konosuba-page .screenshot-lightbox { background: #fffaf2; border-color: #f5bed2; color: var(--k-ink); }
.konosuba-page .lightbox-stage { background: #292338; }

/* Mod information */
.k-about { display: grid; grid-template-columns: minmax(0, 1fr) 43%; gap: 28px; align-items: center; overflow: hidden; padding: 36px; border: 2px solid #fae3c4; border-radius: 25px; background: white; }
.k-about .k-heading { margin-bottom: 12px; }
.k-about > img { width: 100%; border-radius: 15px; }
.k-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 24px 0; }
.k-facts > div { padding: 15px; background: #fff5e6; border-radius: 15px; }
.k-facts strong { display: block; color: #ed5483; font-size: 1.23rem; line-height: 1.4; }
.k-facts span { font-size: .95rem; }

/* Compatibility and installation */
.k-install { padding: 38px; background: #ecf9fc; border-radius: 28px; }
.k-install-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.k-install-meta > div { padding: 16px 20px; background: white; border: 1px solid #c1e7ef; border-radius: 14px; }
.k-install-meta span { display: block; color: var(--k-pink); font: 700 .75rem "Fredoka", sans-serif; letter-spacing: .12em; }
.k-install-meta strong { display: block; margin-top: 4px; font-size: 1rem; }
.k-install-meta code { font-size: .93rem; white-space: nowrap; }
.k-install-meta .copy-button { margin-top: 8px; }
.k-install-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; list-style: none; padding: 0; margin: 0; }
.k-install-steps li { min-width: 0; padding: 22px; background: white; border: 1px solid #c2e6ec; border-radius: 18px; }
.k-install-steps li > span { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: #ffcf4f; font: 700 1.1rem "Fredoka", sans-serif; }
.k-install-steps h3 { color: var(--k-ink); font-size: 1.1rem; margin: 16px 0 8px; }
.k-install-steps p { font-size: 1.06rem; }
.k-install-steps code { overflow-wrap: anywhere; }
.k-install-path { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; padding: 16px 20px; margin-top: 18px; border: 2px dashed #ed94af; border-radius: 15px; background: white; }
.k-install-path > span { width: 100%; color: #e24b7b; font: 700 .75rem "Fredoka", sans-serif; letter-spacing: .12em; }
.k-install-path code { font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.k-install-path .copy-button { margin-left: auto; }
.k-small-note { font-size: 1.06rem; margin-top: 14px; }
.konosuba-page .copy-button { color: #a93062; border-color: #efb8ce; font-size: .78rem; }

/* Credits and download state */
.k-credit-card { display: flex; align-items: center; gap: 18px; padding: 24px 30px; background: white; border: 2px solid #f4ddca; border-radius: 20px; }
.k-credit-card > span { color: #f7b845; font-size: 42px; }
.k-credit-card h3 { color: var(--k-ink); font-size: 1.2rem; }
.k-credit-card p { font-size: 1.06rem; margin-top: 4px; }
.k-download { position: relative; overflow: hidden; min-height: 265px; padding: 46px 54px; border-radius: 29px; background: linear-gradient(105deg, #ffda6b, #ff9fbb 65%, #bceef8); }
.k-download::after { content: "✦"; position: absolute; top: -70px; right: 10%; font-size: 250px; color: #fff6; pointer-events: none; }
.k-download > * { position: relative; z-index: 1; }
.k-download .eyebrow { color: #712c55; }
.k-download h2 { color: var(--k-ink); font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1.25; margin: 8px 0; }
.k-download p:not(.eyebrow) { max-width: 670px; margin-bottom: 20px; }
.k-download .button { background: white; color: #742755; box-shadow: 5px 6px 0 #79245c; }
.k-download-note { display: block; font-size: 1rem; font-weight: 700; margin-top: 14px; }
.konosuba-page .mod-footer { border-top: 1px solid #efd8cd; }

@media (max-width: 1050px) {
    .k-hero { grid-template-columns: 55% 45%; padding-inline: 4%; }
    .k-hero h1 { font-size: clamp(2.4rem, 4.2vw, 3.2rem); }
    .k-hero-art { height: 440px; }
    .k-cover { top: 20px; left: calc(50% - 125px); width: 250px; height: 388px; }
    .k-speech { right: -5px; font-size: .82rem; }
    .k-character-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .k-about { grid-template-columns: 1fr; }
    .k-about > img { max-width: 620px; margin: auto; }
    .k-install-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .konosuba-page .mod-main,
    .konosuba-page .mod-footer { width: min(100% - 32px, 600px); }
    .konosuba-page .mod-main { padding-top: 124px; }
    .k-hero { grid-template-columns: 1fr; padding: 34px 28px; border-radius: 20px; }
    .k-hero h1 { font-size: clamp(2rem, 10vw, 3.2rem); }
    .k-hero-art { height: 390px; }
    .k-cover { top: 35px; left: calc(50% - 105px); width: 210px; height: 325px; }
    .k-speech { top: 10px; right: 0; }
    .konosuba-page .chapter-nav { justify-content: flex-start; width: 100%; max-width: 100%; gap: 0; overflow-x: auto; scrollbar-width: thin; border-radius: 17px; margin-bottom: 50px; }
    .konosuba-page .chapter-nav a { flex: 0 0 auto; padding: 10px 13px; font-size: .82rem; }
    .konosuba-page .k-section { margin-bottom: 50px; }
    .k-heading h2 { font-size: 1.8rem; }
    .k-story-grid,
    .k-character-primary,
    .k-character-secondary { grid-template-columns: 1fr; }
    .k-shot-track .screenshot-item { flex-basis: min(340px, 85%); }
    .k-characters,
    .k-install,
    .k-about { padding: 24px; }
    .k-cast-banner { grid-template-columns: 1fr; }
    .k-cast-banner img { height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
    .k-install-meta { grid-template-columns: 1fr; }
    .k-download { padding: 33px 27px; }
    .k-download h2 { font-size: 1.8rem; }
}
@media (max-width: 420px) {
    .k-hero { padding-inline: 22px; }
    .k-hero .button { padding-inline: 16px; }
    .k-speech { font-size: .75rem; right: -4px; }
    .k-characters,
    .k-install,
    .k-about { padding: 20px; }
    .k-facts { grid-template-columns: 1fr; }
    .k-install-path code { font-size: .84rem; }
    .k-install-path .copy-button { margin-left: 0; }
    .k-credit-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .k-cover,
    .k-speech { transform: none; }
}
