.page-fish .rk-main {
    background: #edf5df;
}

.fish-page-head {
    min-height: 202px;
    padding: 34px 28px;
    color: #fffbe4;
    background-color: var(--rk-water);
    background-image: url("../images/water-tile.webp");
    background-repeat: repeat;
    background-size: 96px 96px;
    border-bottom: 8px solid var(--rk-sand);
}

.fish-page-head-inner {
    display: flex;
    width: min(100%, 1280px);
    min-height: 126px;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    margin: 0 auto;
}

.fish-page-title-block {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 18px;
    text-shadow: 2px 2px 0 var(--rk-deep-dark);
}

.fish-page-sprite,
.fish-data-state-icon {
    display: block;
    flex: 0 0 auto;
    background-image: url("../images/fish-icon.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    image-rendering: pixelated;
}

.fish-page-sprite {
    width: 96px;
    height: 96px;
    filter: drop-shadow(3px 3px 0 rgba(4, 48, 47, 0.75));
}

.fish-page-title-block p {
    margin: 0 0 2px;
    color: #fff1a2;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-page-title-block h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.08;
}

.fish-page-title-block > div > span {
    display: block;
    max-width: 600px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}

.fish-page-stats {
    display: grid;
    width: min(100%, 540px);
    min-width: 470px;
    margin: 0;
    overflow: hidden;
    grid-template-columns: 0.8fr 0.8fr 0.8fr 1.6fr;
    color: var(--rk-ink);
    background: var(--rk-paper);
    border: var(--rk-line);
    border-radius: 6px;
    box-shadow: 5px 5px 0 rgba(4, 48, 47, 0.48);
    text-shadow: none;
}

.fish-page-stats div {
    display: flex;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 9px 10px;
    border-right: 2px solid rgba(24, 58, 54, 0.45);
    text-align: center;
}

.fish-page-stats div:last-child {
    border-right: 0;
}

.fish-page-stats dt {
    color: var(--rk-green-dark);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-page-stats dd {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 900;
}

.fish-page-stats div:last-child dd {
    font-size: 13px;
    line-height: 1.25;
}

.fish-workspace {
    width: min(calc(100% - 40px), 1280px);
    min-height: 620px;
    margin: 0 auto;
    padding: 30px 0 72px;
}

.fish-filter-panel {
    display: grid;
    align-items: end;
    grid-template-columns: minmax(220px, 1.35fr) minmax(140px, 0.75fr) auto minmax(190px, 1.05fr) minmax(155px, 0.8fr) auto;
    gap: 12px;
    padding: 16px;
    background: var(--rk-paper-strong);
    border: var(--rk-line);
    border-radius: 6px;
    box-shadow: 5px 5px 0 #76a078;
}

.fish-control {
    min-width: 0;
}

.fish-control label,
.fish-control legend {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    color: var(--rk-deep);
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-control select,
.fish-search-control input {
    width: 100%;
    min-width: 0;
    height: 44px;
    color: var(--rk-ink);
    background: #fff;
    border: 2px solid var(--rk-ink);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
}

.fish-control select {
    padding: 0 9px;
    cursor: pointer;
}

.fish-control select:disabled {
    cursor: wait;
    opacity: 0.6;
}

.fish-search-control {
    position: relative;
}

.fish-search-control input {
    padding: 0 42px 0 43px;
}

.fish-search-control input::placeholder {
    color: #667d77;
    opacity: 1;
}

.fish-search-icon {
    position: absolute;
    top: 9px;
    left: 9px;
    width: 26px;
    height: 26px;
    pointer-events: none;
    background-image: url("../images/ui-sprites.webp");
    background-repeat: no-repeat;
    background-position: -78px -52px;
    background-size: 208px 208px;
    image-rendering: pixelated;
}

.fish-search-clear {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.fish-search-clear:hover {
    background: #e6efd9;
}

.fish-search-clear span::before,
.fish-search-clear span::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 9px;
    width: 16px;
    height: 2px;
    background: var(--rk-ink);
}

.fish-search-clear span::before {
    transform: rotate(45deg);
}

.fish-search-clear span::after {
    transform: rotate(-45deg);
}

.fish-route-control {
    min-width: 218px;
    margin: 0;
    padding: 0;
    border: 0;
}

.fish-segmented-control {
    display: grid;
    height: 44px;
    overflow: hidden;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: #fff;
    border: 2px solid var(--rk-ink);
    border-radius: 4px;
}

.fish-segmented-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.fish-segmented-control label {
    display: flex;
    min-width: 0;
    height: 40px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 8px;
    cursor: pointer;
    border-right: 1px solid #84948e;
    font-size: 11px;
}

.fish-segmented-control label:last-child {
    border-right: 0;
}

.fish-segmented-control input:checked + label {
    color: #fffbe4;
    background: var(--rk-deep);
}

.fish-segmented-control input:focus-visible + label,
.fish-control select:focus-visible,
.fish-search-control input:focus-visible,
.fish-search-clear:focus-visible,
.fish-reset-button:focus-visible,
.fish-record > summary:focus-visible,
.fish-state-button:focus-visible {
    outline: 3px solid var(--rk-blue);
    outline-offset: 2px;
}

.fish-reset-button,
.fish-state-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    color: #fff;
    background: var(--rk-brown);
    border: 2px solid var(--rk-ink);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-reset-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.fish-results-status {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 4px 8px;
}

.fish-results-status p {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
}

.fish-results-status strong {
    color: var(--rk-deep);
    font-size: 20px;
}

#fish-filter-summary {
    color: #526b64;
    text-align: right;
}

.fish-table-shell {
    overflow: clip;
    background: var(--rk-paper-strong);
    border: var(--rk-line);
    border-radius: 6px;
    box-shadow: 5px 5px 0 #76a078;
}

.fish-table-heading,
.fish-record > summary {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(220px, 1.45fr) 92px minmax(170px, 1fr) minmax(220px, 1.55fr) 116px 38px;
    gap: 12px;
}

.fish-table-heading {
    position: sticky;
    top: 82px;
    z-index: 15;
    min-height: 46px;
    padding: 8px 14px;
    color: #fffbe4;
    background: var(--rk-deep);
    border-bottom: var(--rk-line);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-record {
    background: #fffdf0;
    border-bottom: 2px solid #9eb39a;
}

.fish-record:nth-child(even) {
    background: #f3f8e7;
}

.fish-record:last-child {
    border-bottom: 0;
}

.fish-record[open] {
    background: #fff9dc;
}

.fish-record > summary {
    min-height: 78px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
}

.fish-record > summary::-webkit-details-marker {
    display: none;
}

.fish-record > summary:hover {
    background: rgba(229, 180, 71, 0.18);
}

.fish-cell {
    min-width: 0;
}

.fish-identity {
    display: grid;
    align-items: center;
    grid-template-columns: 74px minmax(0, 1fr);
    column-gap: 10px;
}

.fish-record-icon {
    display: block;
    width: 72px;
    height: 48px;
    flex: 0 0 auto;
    grid-row: 1 / 4;
    background-color: #d7f0da;
    background-image: url("../images/river-king-2-rom-fish-sprites.webp");
    background-repeat: no-repeat;
    background-position: var(--fish-sprite-x) var(--fish-sprite-y);
    background-size: 576px 624px;
    border: 2px solid var(--rk-ink);
    border-radius: 4px;
    image-rendering: pixelated;
}

.fish-internal-id {
    color: #667b73;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-name {
    display: block;
    overflow-wrap: anywhere;
    color: var(--rk-deep);
    font-size: 17px;
    line-height: 1.15;
}

.fish-primary-region {
    color: #5d746c;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
}

.fish-size-value {
    display: block;
    font-size: 16px;
    font-weight: 900;
}

.fish-cell-label {
    display: none;
}

.fish-region-list,
.fish-bait-summary {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.fish-region-chip,
.fish-route-chip,
.fish-status-chip,
.fish-story-chip {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid var(--rk-ink);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
}

.fish-region-chip {
    color: var(--rk-ink);
    background: #dceecb;
}

.fish-region-chip[data-map-id="2"],
.fish-region-chip[data-map-id="7"] {
    background: #cceaf2;
}

.fish-region-chip[data-map-id="3"],
.fish-region-chip[data-map-id="6"] {
    background: #e3dfb9;
}

.fish-region-chip[data-map-id="4"] {
    background: #d9dde5;
}

.fish-region-chip[data-map-id="5"] {
    background: #f5dfa0;
}

.fish-region-chip[data-map-id="8"] {
    color: #fff;
    background: #7b5b93;
}

.fish-bait-summary {
    font-size: 12px;
    line-height: 1.35;
    font-weight: 800;
}

.fish-bait-more {
    color: var(--rk-blue);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 900;
}

.fish-route-chip {
    justify-content: center;
    color: #fff;
    background: var(--rk-green-dark);
}

.fish-expand-icon {
    position: relative;
    display: block;
    width: 34px;
    height: 34px;
    border: 2px solid var(--rk-ink);
    border-radius: 4px;
    background: var(--rk-gold);
}

.fish-expand-icon::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 10px;
    width: 9px;
    height: 9px;
    border-right: 3px solid var(--rk-ink);
    border-bottom: 3px solid var(--rk-ink);
    transform: rotate(45deg);
    transition: transform 120ms ease, top 120ms ease;
}

.fish-record[open] .fish-expand-icon::after {
    top: 13px;
    transform: rotate(225deg);
}

.fish-record-details {
    display: grid;
    grid-template-columns: 1fr 1.45fr 1fr 1.15fr;
    gap: 24px;
    padding: 18px 22px 22px;
    background: #e5f1dd;
    border-top: 2px dashed #729173;
}

.fish-detail-block {
    min-width: 0;
}

.fish-detail-block h3 {
    margin: 0 0 9px;
    color: var(--rk-deep);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-detail-block p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.fish-detail-list,
.fish-bait-group-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fish-detail-list li,
.fish-bait-group-list li {
    font-size: 12px;
    line-height: 1.4;
}

.fish-detail-list strong,
.fish-bait-group-list strong {
    color: var(--rk-deep);
}

.fish-bait-group-list span {
    display: block;
    margin-top: 2px;
}

.fish-status-list,
.fish-story-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fish-status-chip {
    background: #fff7c7;
}

.fish-story-list {
    margin-top: 10px;
}

.fish-story-chip {
    color: #fff;
    background: var(--rk-red);
}

.fish-gear-detail {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-top: 17px;
    border-top: 2px solid #9db593;
}

.fish-gear-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.fish-gear-heading h3 {
    margin-bottom: 4px;
}

.fish-gear-heading p {
    color: #576c62;
    font-size: 10px;
    line-height: 1.35;
}

.fish-gear-heading > span {
    display: inline-flex;
    min-height: 24px;
    flex: 0 0 auto;
    align-items: center;
    padding: 3px 7px;
    color: var(--rk-ink);
    background: #fff3b6;
    border: 1px solid var(--rk-ink);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.fish-gear-plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.fish-gear-plan {
    overflow: hidden;
    background: #fffdf0;
    border: 2px solid #709174;
    border-radius: 5px;
}

.fish-gear-plan > header {
    display: grid;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 9px;
    color: #fff;
    background: var(--rk-deep);
}

.fish-gear-plan > header span {
    color: #fff2a4;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.fish-gear-plan > header strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.15;
}

.fish-gear-plan > header b {
    padding: 3px 5px;
    color: var(--rk-ink);
    background: var(--rk-gold);
    border: 1px solid var(--rk-ink);
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
}

.fish-gear-plan ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fish-gear-plan li {
    display: grid;
    min-width: 0;
    align-items: center;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 7px;
    min-height: 43px;
    padding: 6px 8px;
    border-top: 1px solid #b5c8ad;
}

.fish-gear-part-role {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    padding: 3px 4px;
    color: #48635b;
    background: #dceecb;
    border: 1px solid #779474;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.fish-gear-part-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.fish-gear-link {
    overflow-wrap: anywhere;
    color: var(--rk-deep);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
}

.fish-gear-link:hover {
    color: var(--rk-blue);
}

.fish-gear-link:focus-visible {
    outline: 2px solid var(--rk-blue);
    outline-offset: 2px;
}

.fish-gear-part-copy small {
    color: #64776d;
    font-size: 8px;
    line-height: 1.2;
}

.fish-gear-plan li > b {
    color: #956012;
    font-size: 10px;
    white-space: nowrap;
}

.fish-gear-plan > p {
    margin: 0;
    padding: 8px 9px;
    color: #53675e;
    background: #f7efc8;
    border-top: 1px dashed #8eaa87;
    font-size: 9px;
    line-height: 1.4;
    font-weight: 700;
}

.fish-gear-plan > p strong {
    color: var(--rk-deep);
}

.fish-gear-note {
    margin: 10px 0 0;
    padding: 8px 10px;
    color: #53665f;
    background: rgba(255, 255, 255, 0.64);
    border-left: 4px solid var(--rk-gold);
    font-size: 9px;
    line-height: 1.45;
    font-weight: 700;
}

.fish-data-state {
    display: grid;
    grid-column: 1 / -1;
    min-height: 310px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 32px;
    text-align: center;
}

.fish-data-state-icon {
    width: 68px;
    height: 68px;
}

.fish-data-state strong {
    color: var(--rk-deep);
    font-size: 18px;
}

.fish-data-state p {
    max-width: 520px;
    margin: 0;
    line-height: 1.5;
}

.fish-state-button {
    margin-top: 5px;
    background: var(--rk-deep);
}

.fish-noscript {
    padding: 16px;
    color: #fff;
    background: var(--rk-red);
    border: var(--rk-line);
    font-weight: 900;
}

@media (max-width: 1180px) {
    .fish-page-head-inner {
        gap: 22px;
    }

    .fish-page-stats {
        min-width: 430px;
    }

    .fish-filter-panel {
        grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.8fr) minmax(218px, 1fr);
    }

    .fish-reset-button {
        width: 100%;
    }

    .fish-table-heading,
    .fish-record > summary {
        grid-template-columns: minmax(210px, 1.35fr) 82px minmax(150px, 1fr) minmax(200px, 1.25fr) 104px 38px;
        gap: 9px;
    }
}

@media (max-width: 940px) {
    .fish-page-head-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .fish-page-stats {
        width: 100%;
        min-width: 0;
    }

    .fish-table-heading {
        display: none;
    }

    .fish-result-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 12px;
    }

    .fish-record,
    .fish-record:nth-child(even) {
        overflow: hidden;
        background: #fffdf0;
        border: 2px solid #729173;
        border-radius: 6px;
    }

    .fish-record > summary {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) 38px;
        gap: 12px;
        padding: 13px;
    }

    .fish-identity {
        grid-column: 1;
    }

    .fish-size-cell,
    .fish-region-cell,
    .fish-bait-cell,
    .fish-route-cell {
        grid-column: 1 / -1;
    }

    .fish-expand-cell {
        grid-row: 1;
        grid-column: 2;
    }

    .fish-cell-label {
        display: block;
        margin-bottom: 4px;
        color: #65776e;
        font-size: 9px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .fish-size-value {
        display: inline;
        font-size: 14px;
    }

    .fish-record-details {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        padding: 16px;
    }
}

@media (max-width: 760px) {
    .fish-page-head {
        padding: 28px 18px;
    }

    .fish-page-title-block h1 {
        font-size: 32px;
    }

    .fish-page-sprite {
        width: 78px;
        height: 78px;
    }

    .fish-workspace {
        width: min(calc(100% - 24px), 1280px);
        padding-top: 20px;
    }

    .fish-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .fish-search-field,
    .fish-bait-control {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .fish-page-title-block {
        align-items: flex-start;
        gap: 10px;
    }

    .fish-page-sprite {
        width: 62px;
        height: 62px;
    }

    .fish-page-title-block p {
        font-size: 10px;
    }

    .fish-page-title-block h1 {
        font-size: 27px;
    }

    .fish-page-title-block > div > span {
        font-size: 12px;
    }

    .fish-page-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fish-page-stats div {
        min-height: 64px;
        border-right: 2px solid rgba(24, 58, 54, 0.45);
        border-bottom: 2px solid rgba(24, 58, 54, 0.45);
    }

    .fish-page-stats div:nth-child(even) {
        border-right: 0;
    }

    .fish-page-stats div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .fish-filter-panel {
        grid-template-columns: 1fr;
        padding: 13px;
    }

    .fish-search-field,
    .fish-route-control,
    .fish-bait-control {
        grid-column: auto;
    }

    .fish-results-status {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        padding: 12px 3px 9px;
    }

    #fish-filter-summary {
        text-align: left;
    }

    .fish-result-list {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 9px;
    }

    .fish-record-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fish-gear-heading {
        flex-direction: column;
        gap: 6px;
    }

    .fish-gear-plan > header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .fish-gear-plan > header b {
        grid-column: 2;
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fish-expand-icon::after {
        transition: none;
    }
}
