.page-king-guide {
    background: #082f31;
}

.king-guide {
    --king-ink: #183a36;
    --king-deep: #075653;
    --king-deep-dark: #043f3e;
    --king-paper: #fffdf1;
    --king-cream: #fff9dc;
    --king-gold: #e5b447;
    --king-gold-light: #ffe584;
    --king-green: #4f9b43;
    --king-blue: #147d9e;
    --king-red: #b84635;
    --king-muted: #3f564f;
    --king-line: #183a36;
    background: var(--king-cream);
    overflow-wrap: anywhere;
}

.king-guide h1,
.king-guide h2,
.king-guide h3,
.king-guide h4,
.king-guide p,
.king-guide ol,
.king-guide ul,
.king-guide dl,
.king-guide figure,
.king-guide table {
    margin-top: 0;
}

.king-guide h1,
.king-guide h2,
.king-guide h3,
.king-guide p,
.king-guide li,
.king-guide dd,
.king-guide dt,
.king-guide a,
.king-guide span,
.king-guide button,
.king-guide label,
.king-guide td,
.king-guide th {
    overflow-wrap: anywhere;
}

.king-guide [id] {
    scroll-margin-top: 104px;
}

.king-guide button {
    font: inherit;
    cursor: pointer;
}

.king-guide a:focus-visible,
.king-guide button:focus-visible {
    outline: 3px solid #ffea82;
    outline-offset: 3px;
}

.king-hero {
    position: relative;
    overflow: hidden;
    color: #fffdf0;
    background-color: #0c4f5f;
    background-image:
        linear-gradient(118deg, rgba(4, 47, 55, 0.97) 0%, rgba(7, 86, 83, 0.92) 46%, rgba(18, 96, 128, 0.88) 100%),
        url("../images/water-tile.webp");
    background-repeat: repeat;
    background-size: auto, 96px 96px;
    border-bottom: 8px solid var(--king-gold);
}

.king-hero::before,
.king-hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
    border-radius: 50%;
}

.king-hero::before {
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -180px;
    border: 42px solid rgba(255, 229, 132, 0.09);
    box-shadow: 0 0 0 36px rgba(255, 255, 255, 0.03);
}

.king-hero::after {
    width: 200px;
    height: 200px;
    top: 36px;
    left: -70px;
    border: 28px solid rgba(255, 255, 255, 0.05);
}

.king-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(calc(100% - 48px), 1180px);
    margin: 0 auto;
    padding: 58px 0 62px;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 44px;
    align-items: center;
}

.king-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px;
    color: #cfedf0;
    font-size: 12px;
    font-weight: 800;
}

.king-breadcrumbs a {
    color: inherit;
    text-underline-offset: 3px;
}

.king-breadcrumbs a:hover {
    color: #fff1a0;
}

.king-kicker,
.king-section-heading > p,
.king-answer-heading p,
.king-toc > p,
.king-order-step {
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.king-kicker {
    color: #ffe888;
}

.king-hero h1 {
    max-width: 720px;
    margin-bottom: 18px;
    color: #fffdf0;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-shadow: 3px 3px 0 #043f3e;
}

.king-lead {
    max-width: 680px;
    margin-bottom: 24px;
    color: #e5f4e5;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 700;
}

.king-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.king-primary-action,
.king-secondary-action {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 3px solid #132f2d;
    border-radius: 5px;
    box-shadow: 4px 4px 0 rgba(2, 43, 42, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

.king-primary-action {
    color: #183a36;
    background: #ffe27a;
}

.king-secondary-action {
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
}

.king-primary-action:hover,
.king-secondary-action:hover {
    transform: translateY(-1px);
    box-shadow: 4px 5px 0 rgba(2, 43, 42, 0.9);
}

.king-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

.king-hero-stats > div {
    display: grid;
    min-width: 108px;
    gap: 2px;
    padding: 8px 13px;
    background: rgba(2, 47, 47, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.king-hero-stats dt {
    color: #bfe3d0;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.king-hero-stats dd {
    margin: 0;
    color: #fff4a6;
    font-size: 15px;
    font-weight: 900;
}

.king-answer-card {
    padding: 22px;
    color: var(--king-ink);
    background: var(--king-paper);
    border: 4px solid var(--king-line);
    border-radius: 8px;
    box-shadow: 9px 9px 0 rgba(3, 48, 47, 0.72);
}

.king-answer-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 3px dashed #91aa7d;
}

.king-answer-heading p {
    margin-bottom: 3px;
    color: #2f6b3f;
}

.king-answer-heading h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.15;
}

.king-crown {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 42%, #ffe584 0 28%, transparent 29%),
        linear-gradient(145deg, #e5b447, #b8861f);
    border: 3px solid #183a36;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.king-answer-card ol {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.king-answer-card li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.king-answer-card li span {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #075653;
    color: #fff8d2;
    font-size: 12px;
    font-weight: 900;
}

.king-answer-card li p {
    margin: 0;
    color: var(--king-ink);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.king-answer-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 3px dashed #91aa7d;
    color: var(--king-muted);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.king-page-layout {
    display: grid;
    width: min(calc(100% - 48px), 1180px);
    margin: 0 auto;
    padding: 42px 0 72px;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 34px;
    align-items: start;
}

.king-main-column {
    display: grid;
    gap: 28px;
    min-width: 0;
}

.king-section {
    padding: 28px;
    color: var(--king-ink);
    background: var(--king-paper);
    border: 4px solid var(--king-line);
    border-radius: 10px;
    box-shadow: 7px 7px 0 rgba(3, 48, 47, 0.18);
}

.king-section-heading {
    margin-bottom: 22px;
}

.king-section-heading > p {
    color: #2f6b3f;
}

.king-section-heading h2 {
    margin-bottom: 10px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.king-section-heading > span {
    display: block;
    color: var(--king-muted);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 700;
}

.king-section-heading.is-light > p {
    color: #ffe888;
}

.king-section-heading.is-light h2,
.king-section-heading.is-light > span {
    color: #fffdf0;
}

.king-order-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.king-order-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #fbfff4;
    min-width: 0;
}

.king-order-card.is-river {
    background: linear-gradient(180deg, #f3fbe8 0%, #fbfff4 100%);
}

.king-order-card.is-sea {
    background: linear-gradient(180deg, #e8f6fb 0%, #fbfff4 100%);
}

.king-order-card.is-fish {
    background: linear-gradient(180deg, #fff6df 0%, #fbfff4 100%);
}

.king-order-step {
    color: #2f6b3f;
}

.king-order-card h3 {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.2;
}

.king-order-card p,
.king-order-card li {
    color: var(--king-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.king-order-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

.king-order-card a {
    color: var(--king-deep);
    font-weight: 900;
    text-underline-offset: 3px;
}

.king-tool-section {
    color: #fffdf0;
    background:
        linear-gradient(160deg, rgba(4, 63, 62, 0.98), rgba(10, 84, 108, 0.96)),
        url("../images/water-tile.webp");
    background-size: auto, 96px 96px;
    border-color: #ffe27a;
}

.king-tool-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.king-tool-picker button {
    min-height: 46px;
    padding: 10px 16px;
    border: 3px solid #132f2d;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fffdf0;
    font-weight: 900;
    box-shadow: 3px 3px 0 rgba(2, 30, 30, 0.55);
}

.king-tool-picker button.is-active,
.king-tool-picker button[aria-selected="true"] {
    color: #183a36;
    background: #ffe27a;
}

.king-tool-result {
    min-height: 220px;
    padding: 18px;
    border: 3px solid rgba(255, 226, 122, 0.55);
    border-radius: 8px;
    background: rgba(2, 36, 38, 0.42);
}

.king-tool-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 180px;
    color: #e8f7ee;
    text-align: center;
}

.king-tool-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffe27a;
    border-radius: 50%;
    animation: king-spin 0.8s linear infinite;
}

@keyframes king-spin {
    to { transform: rotate(360deg); }
}

.king-tool-error {
    color: #ffe0d8;
    font-weight: 800;
    line-height: 1.5;
}

.king-result-head {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 2px dashed rgba(255, 226, 122, 0.45);
}

.king-result-sprite {
    display: block;
    width: 88px;
    height: 64px;
    border: 3px solid #ffe27a;
    border-radius: 6px;
    background-color: #0a3d45;
    background-image: url("../images/river-king-2-rom-fish-sprites.webp");
    background-repeat: no-repeat;
    background-position: var(--king-fish-x, 0) var(--king-fish-y, 0);
    image-rendering: pixelated;
}

.king-result-name span {
    display: block;
    margin-bottom: 4px;
    color: #bfe3d0;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.king-result-name strong {
    display: block;
    color: #fff4a6;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.king-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
}

.king-result-meta span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #e8f7ee;
    font-size: 12px;
    font-weight: 800;
}

.king-result-gates {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-left: 4px solid #ffe27a;
    background: rgba(0, 0, 0, 0.18);
    color: #e8f7ee;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.king-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.king-method-card {
    padding: 14px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 253, 241, 0.08);
}

.king-method-card.is-primary {
    border-color: #ffe27a;
    background: rgba(255, 226, 122, 0.12);
}

.king-method-card h4 {
    margin: 0 0 10px;
    color: #fff4a6;
    font-size: 15px;
}

.king-method-card p {
    margin: 0 0 8px;
    color: #e5f4e5;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.king-method-card p:last-child {
    margin-bottom: 0;
}

.king-method-card a {
    color: #ffe888;
    font-weight: 900;
}

.king-result-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.king-result-links a {
    color: #183a36;
    background: #ffe27a;
    border: 2px solid #132f2d;
    border-radius: 5px;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.king-noscript {
    margin: 14px 0 0;
    color: #ffe0d8;
    font-weight: 800;
}

.king-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.king-detail-grid article {
    padding: 16px;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #fbfff4;
}

.king-detail-grid h3 {
    margin-bottom: 10px;
    font-size: 17px;
}

.king-check-list {
    margin: 0;
    padding-left: 1.15rem;
}

.king-check-list li {
    margin: 0.4rem 0;
    color: var(--king-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.king-callout {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 3px solid #183a36;
    border-left-width: 8px;
    border-radius: 8px;
    background: #fff6df;
    color: var(--king-ink);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.king-callout.is-sea {
    background: #e8f6fb;
}

.king-callout.is-fish {
    background: #f3fbe8;
}

.king-figure {
    margin: 0;
}

.king-figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #0a3d45;
}

.king-figure figcaption {
    margin-top: 10px;
    color: var(--king-muted);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.king-table-wrap {
    overflow-x: auto;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #fbfff4;
}

.king-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.king-table-wrap th,
.king-table-wrap td {
    padding: 12px 14px;
    border-bottom: 1px solid #c9d8b8;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.king-table-wrap th {
    background: #075653;
    color: #fff8d2;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.king-table-wrap tr:last-child td {
    border-bottom: none;
}

.king-table-note {
    margin: 14px 0 0;
    color: var(--king-muted);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.king-gear-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.king-gear-grid article {
    padding: 14px;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #fbfff4;
    min-width: 0;
}

.king-gear-grid h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.king-gear-grid p {
    margin: 0;
    color: var(--king-muted);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.king-troubleshooter {
    display: grid;
    gap: 10px;
}

.king-troubleshooter details {
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #fbfff4;
    overflow: hidden;
}

.king-troubleshooter summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    font-weight: 900;
    color: var(--king-ink);
}

.king-troubleshooter summary::-webkit-details-marker {
    display: none;
}

.king-troubleshooter details[open] summary {
    border-bottom: 2px dashed #91aa7d;
    background: #f3fbe8;
}

.king-troubleshooter details > div {
    padding: 14px 16px 16px;
}

.king-troubleshooter p {
    margin: 0;
    color: var(--king-muted);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.king-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.king-faq-grid article {
    padding: 16px;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: #fbfff4;
    min-width: 0;
}

.king-faq-grid h3 {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.25;
}

.king-faq-grid p {
    margin: 0;
    color: var(--king-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.king-next-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.king-next-links a {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 3px solid var(--king-line);
    border-radius: 8px;
    background: var(--king-paper);
    box-shadow: 5px 5px 0 rgba(3, 48, 47, 0.16);
    text-decoration: none;
    color: var(--king-ink);
}

.king-next-links a span {
    color: var(--king-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.king-next-links a strong {
    font-size: 17px;
}

.king-next-links a:hover {
    transform: translateY(-1px);
    background: #fbfff4;
}

.king-side-column {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 92px;
}

.king-toc {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 4px solid var(--king-line);
    border-radius: 10px;
    background: var(--king-paper);
    box-shadow: 6px 6px 0 rgba(3, 48, 47, 0.16);
}

.king-toc > p {
    color: #2f6b3f;
}

.king-toc a {
    color: var(--king-deep);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px dashed #c9d8b8;
}

.king-toc a:last-child {
    border-bottom: none;
}

.king-toc a:hover {
    color: #0a6f4f;
}

.king-game-shot {
    margin: 0;
    padding: 12px;
    border: 4px solid var(--king-line);
    border-radius: 10px;
    background: var(--king-paper);
    box-shadow: 6px 6px 0 rgba(3, 48, 47, 0.16);
}

.king-game-shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid var(--king-line);
    border-radius: 6px;
    image-rendering: pixelated;
    background: #0a3d45;
}

.king-game-shot figcaption {
    margin-top: 10px;
    color: var(--king-muted);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.king-side-tip {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 14px;
    border: 4px solid var(--king-line);
    border-radius: 10px;
    background: #fff6df;
    box-shadow: 6px 6px 0 rgba(3, 48, 47, 0.16);
}

.king-side-tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--king-line);
    background: radial-gradient(circle at 35% 30%, #fff 0 18%, #ffe27a 19% 100%);
}

.king-side-tip p {
    margin: 0;
    color: var(--king-ink);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

@media (max-width: 980px) {
    .king-hero-inner,
    .king-page-layout {
        grid-template-columns: 1fr;
    }

    .king-side-column {
        position: static;
        order: -1;
    }

    .king-order-grid,
    .king-gear-grid,
    .king-faq-grid,
    .king-next-links,
    .king-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .king-hero-inner,
    .king-page-layout {
        width: min(calc(100% - 24px), 1180px);
        padding-left: 0;
        padding-right: 0;
    }

    .king-hero-inner {
        padding-top: 36px;
        padding-bottom: 40px;
        gap: 24px;
    }

    .king-section {
        padding: 18px;
    }

    .king-hero h1 {
        font-size: clamp(30px, 9vw, 42px);
    }

    .king-lead {
        font-size: 16px;
    }

    .king-result-head {
        grid-template-columns: 1fr;
    }

    .king-table-wrap th,
    .king-table-wrap td {
        padding: 10px;
        font-size: 13px;
    }
}
