/* ==========================================================================
   SUMMER LAKE FISHING – HỒ MÙA HÈ (Dual-Mode Dark Luxury & Dawn Compatible)
   Zero-Emoji Policy | 0px Horizontal Overflow | Touch-Friendly 54px Hold Pad
   ========================================================================== */

:root {
    --fish-surface: rgba(18, 14, 34, 0.86);
    --fish-surface-soft: rgba(30, 22, 54, 0.65);
    --fish-border: rgba(255, 255, 255, 0.12);
    --fish-border-amber: rgba(245, 158, 11, 0.42);
    --fish-text-main: #f8fafc;
    --fish-text-sub: #cbd5e1;
    --fish-accent-gold: #fbbf24;
    --fish-accent-emerald: #10b981;
    --fish-accent-cyan: #38bdf8;
    --fish-accent-purple: #a855f7;
    /* Sunny Summer Gold & Ocean Blue ("Nắng Vàng & Biển Xanh") UI Tokens */
    --fish-parchment: #FFFDF5;
    --fish-parchment-soft: #FFF8E1;
    --fish-parchment-slot: #E3F6F5;
    --fish-parchment-locked: #DCEEF2;
    --fish-parchment-ink: #133B4E;
    --fish-parchment-sub: #3A667B;
    --fish-parchment-line: #7FAEC2;
    --fish-parchment-border: #1D5B79;
    --fish-parchment-gold: #B45309;
    --fish-summer-gold: #FFB703;
    --fish-summer-coral: #FF7B54;
    --fish-summer-teal: #00A896;
}

html[data-feast-mode="dawn"] {
    --fish-surface: rgba(255, 255, 255, 0.92);
    --fish-surface-soft: rgba(241, 245, 249, 0.88);
    --fish-border: rgba(15, 23, 42, 0.12);
    --fish-border-amber: rgba(217, 119, 6, 0.45);
    --fish-text-main: #0f172a;
    --fish-text-sub: #334155;
}

.fishing-wrapper {
    min-height: calc(100vh - 140px);
    padding: 16px 14px 80px;
    color: var(--fish-text-main);
    overflow-x: hidden;
}

.fishing-container {
    max-width: 1220px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.fishing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--fish-border);
    margin-bottom: 14px;
}

.fishing-title {
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--fish-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fishing-subtitle {
    margin: 3px 0 0;
    font-size: 0.82rem;
    color: var(--fish-text-sub);
}

.fishing-header-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.fishing-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 9999px;
    background: var(--fish-surface);
    border: 1px solid var(--fish-border);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--fish-text-main);
    white-space: nowrap;
}

.fishing-stat-pill.balance-pill {
    border-color: var(--fish-border-amber);
    color: var(--fish-accent-gold);
}

.fishing-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: var(--fish-surface);
    border: 1px solid var(--fish-border);
    color: var(--fish-text-main);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.fishing-tool-btn:hover {
    border-color: var(--fish-accent-cyan);
    transform: translateY(-1px);
}

/* Guest Practice Banner */
.fishing-guest-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--fish-text-main);
    font-size: 0.86rem;
}

/* Single Centered Stage Layout (Focus on Hồ Mùa Hè scenery) */
.fishing-stage-shell {
    max-width: 980px;
    margin: 0 auto;
    width: 100%;
}

/* Stage Card (Cozy Pixel Parchment + Framed Lake Stage) */
.fishing-stage-card {
    position: relative;
    background: var(--fish-parchment);
    color: var(--fish-parchment-ink);
    border: 12px solid transparent;
    border-image-source: url('/assets/fishing/ui/ui_panel_border.png?v=20261127b');
    border-image-slice: 12 fill;
    border-image-repeat: stretch;
    border-radius: 0;
    padding: 8px 10px 10px;
    box-shadow: 0 18px 40px -12px rgba(18, 10, 14, 0.55);
    image-rendering: pixelated;
}

.fishing-stage-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.fishing-phase-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: #dbeafe;
    border: 2px solid #1d4ed8;
    color: #1e3a8a;
}

.fishing-phase-badge[data-phase="casting"] {
    background: #fef3c7;
    border-color: #b45309;
    color: #78350f;
}

.fishing-phase-badge[data-phase="biting"] {
    background: #ffe4e6;
    border-color: #be123c;
    color: #881337;
}

.fishing-phase-badge[data-phase="reeling"] {
    background: #d1fae5;
    border-color: #047857;
    color: #064e3b;
}

.fishing-telemetry-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--fish-parchment-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fishing-canvas-wrap {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    border: 3px solid var(--fish-parchment-border);
    background: #3e97b3;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.fishing-canvas-wrap:not([data-phase="idle"]):not([data-phase="result"]) {
    touch-action: none;
}

#fishingCanvas {
    display: block;
    width: 100%;
    height: 460px;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.fishing-canvas-wrap:not([data-phase="idle"]):not([data-phase="result"]) #fishingCanvas {
    touch-action: none;
}

@media (max-width: 991.98px) {
    #fishingCanvas {
        height: 440px;
        cursor: default;
    }
}

@media (hover: none) and (pointer: coarse) {
    #fishingCanvas {
        cursor: default;
    }
}

/* Top-Left Corner Pixel Audio Toggle Buttons (Music + Sound) */
.fishing-audio-corner {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.fishing-audio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 48px;
    padding: 6px 6px 4px;
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    background: rgba(255, 253, 245, 0.94);
    box-shadow: inset 1.5px 1.5px 0 #ffffff, inset -1.5px -1.5px 0 #7FAEC2, 0 4px 10px rgba(19, 59, 78, 0.25);
    color: var(--fish-parchment-ink);
    cursor: pointer;
    image-rendering: pixelated;
    transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.fishing-audio-btn:hover {
    transform: translateY(-2px);
    background: #FFE066;
    border-color: var(--fish-summer-coral);
}

.fishing-audio-btn.is-muted {
    background: rgba(220, 238, 242, 0.90);
    color: #4A7C8C;
    box-shadow: inset 1px 1px 0 #ffffff, 0 2px 6px rgba(19, 59, 78, 0.16);
}

.fishing-audio-icon {
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.fishing-audio-label {
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

@media (max-width: 539.98px) {
    .fishing-audio-corner {
        top: 8px;
        left: 8px;
        gap: 5px;
    }

    .fishing-audio-btn {
        min-width: 42px;
        padding: 4px 5px 3px;
    }

    .fishing-audio-icon {
        width: 17px;
        height: 17px;
    }

    .fishing-audio-icon svg {
        width: 16px;
        height: 16px;
    }

    .fishing-audio-label {
        font-size: 0.52rem;
    }
}

/* Top-Right Floating 4 Pixel HUD Buttons Over Sky */
.fishing-hud-dock {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fishing-hud-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 60px;
    padding: 7px 6px 4px;
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    background: rgba(255, 253, 245, 0.94);
    box-shadow: inset 1.5px 1.5px 0 #ffffff, inset -1.5px -1.5px 0 #7FAEC2, 0 4px 10px rgba(19, 59, 78, 0.28);
    color: var(--fish-parchment-ink);
    cursor: pointer;
    image-rendering: pixelated;
    transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.fishing-hud-btn:hover {
    transform: translateY(-2px);
    background: #FFE066;
    border-color: var(--fish-summer-coral);
}

.fishing-hud-btn:active {
    transform: translateY(0);
}

.fishing-hud-icon-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.fishing-hud-label {
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--fish-parchment-ink);
    white-space: nowrap;
}

.fishing-hud-badge {
    position: absolute;
    top: -7px;
    right: -5px;
    z-index: 2;
    min-width: 17px;
    height: 15px;
    padding: 0 4px;
    border: 1.5px solid var(--fish-parchment-border);
    border-radius: 0;
    background: #FFE066;
    color: #133B4E;
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fishing-hud-badge.is-progress {
    background: #E3F6F5;
    color: #133B4E;
    font-size: 0.56rem;
    padding: 0 3px;
}

@media (max-width: 539.98px) {
    .fishing-hud-dock {
        top: 8px;
        right: 8px;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }

    .fishing-hud-btn {
        width: 58px;
        min-width: 58px;
        padding: 5px 4px 3px;
    }

    .fishing-hud-icon-box {
        width: 24px;
        height: 24px;
    }

    .fishing-hud-icon-box img {
        width: 24px;
        height: 24px;
    }

    .fishing-hud-label {
        font-size: 0.56rem;
    }

    .fishing-canvas-wrap.is-reeling .fishing-hud-dock {
        opacity: 0;
        pointer-events: none;
        transform: translateX(8px);
    }
}

/* Integrated Circular Fishing Action Button (Bottom-Right inside Stage) */
.fishing-stage-cast-wrap {
    position: absolute;
    right: 16px;
    bottom: 12px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.fishing-circle-cast-btn {
    width: 68px;
    height: 68px;
    border-radius: 0;
    border: none;
    background-color: transparent;
    background-image: url('/assets/fishing/ui/ui_circle_btn_idle.png?v=20261127c');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    box-shadow: none;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: transform 0.08s steps(2, end), filter 0.12s steps(2, end);
}

.fishing-circle-rod-sprite,
.fishing-circle-cast-btn img {
    width: 32px;
    height: 32px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
}

.fishing-circle-cast-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.fishing-circle-cast-btn:active,
.fishing-circle-cast-btn.is-casting,
.fishing-circle-cast-btn.is-reeling {
    filter: brightness(0.96);
    background-color: transparent;
    background-image: url('/assets/fishing/ui/ui_circle_btn_active.png?v=20261127c');
    box-shadow: none;
}

.fishing-circle-cast-btn.is-waiting {
    background-color: transparent;
    background-image: url('/assets/fishing/ui/ui_circle_btn_wait.png?v=20261127c');
    box-shadow: none;
}

.fishing-circle-cast-btn.is-biting {
    background-color: transparent;
    background-image: url('/assets/fishing/ui/ui_circle_btn_bite.png?v=20261127c');
    box-shadow: none;
    animation: fishingCirclePixelPulse 0.4s steps(2, end) infinite;
}

@keyframes fishingCirclePixelPulse {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.18);
    }
}

.fishing-circle-cast-label {
    padding: 2px 9px;
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    background: #FFFDF5;
    box-shadow: 2px 2px 0 #133B4E;
    color: var(--fish-parchment-ink);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@media (max-width: 575.98px) {
    .fishing-stage-cast-wrap {
        right: 10px;
        bottom: 10px;
    }

    .fishing-circle-cast-btn {
        width: 58px;
        height: 58px;
    }

    .fishing-circle-rod-sprite,
    .fishing-circle-cast-btn img {
        width: 28px;
        height: 28px;
    }

    .fishing-circle-cast-label {
        font-size: 0.66rem;
        padding: 1px 7px;
    }
}

.pixel-art-icon {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    display: block;
    flex-shrink: 0;
}

/* Stardew Cozy Pixel Item Slots (Strict 0px border-radius + 3 distinct states) */
.pixel-slot-box {
    width: 48px;
    height: 48px;
    border-radius: 0;
    border: none;
    padding: 0;
    background-color: transparent;
    background-image: url('/assets/fishing/ui/ui_slot_normal.png?v=20261127b');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.pixel-slot-box.is-equipped,
.pixel-slot-box.is-selected {
    background-image: url('/assets/fishing/ui/ui_slot_equipped.png?v=20261127b');
}

.pixel-slot-box.is-locked {
    background-image: url('/assets/fishing/ui/ui_slot_locked.png?v=20261127b');
}

.pixel-slot-box img.pixel-art-icon {
    width: 32px;
    height: 32px;
}

.pixel-slot-stack {
    position: absolute;
    right: 2px;
    bottom: 2px;
    background: var(--fish-parchment-border);
    color: #fffbeb;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.15;
    padding: 1px 4px;
    border-radius: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pixel-slot-lock-pip {
    position: absolute;
    right: 2px;
    bottom: 2px;
    background: var(--fish-parchment-border);
    color: var(--fish-parchment-face, #f5e5df);
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

/* Cozy Sakura Branch Corner Ornaments */
.sakura-corner-ornament {
    position: absolute;
    width: 38px;
    height: 38px;
    pointer-events: none;
    z-index: 4;
}

.sakura-corner-ornament.is-tl {
    top: -15px;
    left: -15px;
}

.sakura-corner-ornament.is-br {
    bottom: -15px;
    right: -15px;
    transform: rotate(180deg);
}

@media (max-width: 479.98px) {
    .pixel-slot-box {
        width: 44px;
        height: 44px;
    }

    .sakura-corner-ornament {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 575.98px) {
    .fishing-wrapper {
        padding: 14px 10px 92px;
    }

    .fishing-header {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .fishing-guest-banner {
        padding: 8px 12px;
        margin-bottom: 12px;
        font-size: 0.78rem;
    }

    #fishingCanvas {
        height: clamp(470px, 64vh, 520px);
    }

    .fishing-stage-card {
        padding: 10px;
    }

    .fishing-action-pad {
        min-height: 54px;
    }
}

/* Balanced Scroll Container for Shop Tab on Desktop */
.fishing-shop-scroll {
    max-height: 475px;
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 991.98px) {
    .fishing-shop-scroll {
        max-height: none;
    }
}

/* Keep Mascot, Ambient Snow/Particles & LiveChat from dragging down Fishing Canvas FPS or causing mobile mistaps */
body.fishing-page-body .mascot-bubble,
body.fishing-page-body .ambient-effects-layer,
body.fishing-page-body #canva-effects-canvas {
    display: none !important;
}

body.fishing-page-body.fishing-active-lock .mascot-container,
body.fishing-page-body.fishing-active-lock .xiexie-chat-trigger {
    pointer-events: none !important;
    opacity: 0.22 !important;
}

@media (max-width: 991.98px), (hover: none) and (pointer: coarse) {
    body.fishing-page-body .mascot-container {
        pointer-events: none !important;
        opacity: 0.25 !important;
    }

    body.fishing-page-body .xiexie-chat-trigger {
        transform: scale(0.84);
        opacity: 0.85;
    }
}

.fishing-stage-card,
.fishing-stage-topbar,
.fishing-audio-corner,
.fishing-audio-btn,
.fishing-hud-dock,
.fishing-hud-btn,
.fishing-controls-row,
.fishing-action-pad,
.fishing-status-banner,
.fishing-result-overlay {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -webkit-tap-highlight-color: transparent;
}

.fishing-audio-btn *,
.fishing-hud-btn *,
.fishing-action-pad * {
    pointer-events: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
}

.fishing-audio-btn,
.fishing-hud-btn,
.btn-shop-unequip {
    touch-action: manipulation;
}

/* Result Overlay inside Canvas */
.fishing-result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 24, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: opacity 0.22s ease;
    z-index: 5;
}

.fishing-result-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.fishing-result-box {
    width: 100%;
    max-width: 340px;
    background: var(--fish-parchment);
    border: 12px solid transparent;
    border-image-source: url('/assets/fishing/ui/ui_panel_border.png?v=20261127b');
    border-image-slice: 12 fill;
    border-image-repeat: stretch;
    border-radius: 0;
    padding: 14px;
    text-align: center;
    color: var(--fish-parchment-ink);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
    image-rendering: pixelated;
}

.result-sprite-stage {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 6px auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/assets/fishing/ui/ui_slot_equipped.png?v=20261127b');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 0;
    image-rendering: pixelated;
}

.result-pixel-sparkles {
    position: absolute;
    inset: -12px;
    pointer-events: none;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3;
    image-rendering: pixelated;
}

.result-pixel-sparkles svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fishing-result-box[data-rarity-fx="rare"] .result-pixel-sparkles,
.fishing-result-box[data-rarity-fx="epic"] .result-pixel-sparkles,
.fishing-result-box[data-rarity-fx="legendary"] .result-pixel-sparkles,
.fishing-result-box[data-rarity-fx="golden-koi"] .result-pixel-sparkles {
    display: flex;
}

.fishing-result-box[data-rarity-fx="rare"] .result-pixel-sparkles .sp-ray {
    fill: #8FD3E0;
}

.fishing-result-box[data-rarity-fx="epic"] .result-pixel-sparkles .sp-ray {
    fill: #C084FC;
}

.fishing-result-box[data-rarity-fx="legendary"] .result-pixel-sparkles .sp-ray,
.fishing-result-box[data-rarity-fx="golden-koi"] .result-pixel-sparkles .sp-ray {
    fill: #FEF08A;
}

.fishing-result-box[data-rarity-fx="golden-koi"] {
    box-shadow: 0 0 0 3px #FFB703, 0 20px 45px rgba(251, 191, 36, 0.38);
}

.fishing-result-box[data-rarity-fx="rare"] .sp-star,
.fishing-result-box[data-rarity-fx="epic"] .sp-star,
.fishing-result-box[data-rarity-fx="legendary"] .sp-star,
.fishing-result-box[data-rarity-fx="golden-koi"] .sp-star {
    animation: fishingPixelBlink 0.72s steps(2, end) infinite;
}

.fishing-result-box[data-rarity-fx="rare"] .sp-s2,
.fishing-result-box[data-rarity-fx="epic"] .sp-s2,
.fishing-result-box[data-rarity-fx="legendary"] .sp-s2,
.fishing-result-box[data-rarity-fx="golden-koi"] .sp-s2,
.fishing-result-box[data-rarity-fx="golden-koi"] .sp-s4 {
    animation-delay: 0.36s;
}

.fishing-result-box[data-rarity-fx="rare"] .sp-ray,
.fishing-result-box[data-rarity-fx="epic"] .sp-ray,
.fishing-result-box[data-rarity-fx="legendary"] .sp-ray,
.fishing-result-box[data-rarity-fx="golden-koi"] .sp-ray {
    animation: fishingPixelRayPulse 0.9s steps(3, end) infinite;
}

@keyframes fishingPixelBlink {
    0% { opacity: 1; }
    50% { opacity: 0.15; }
    100% { opacity: 1; }
}

@keyframes fishingPixelRayPulse {
    0% { opacity: 0.95; }
    50% { opacity: 0.35; }
    100% { opacity: 0.95; }
}

.result-item-icon {
    position: relative;
    z-index: 2;
    width: 48px;
    height: 48px;
}

.result-item-icon.is-dimmed {
    opacity: 0.45;
    filter: grayscale(0.9);
}

.result-rarity-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 0;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    background: #E3F6F5;
    color: #133B4E;
    border: 2px solid #1D5B79;
}

.result-rarity-pill[data-tone="legendary"] {
    background: #FFE066;
    color: #133B4E;
    border-color: #FF7B54;
}

.result-rarity-pill[data-tone="epic"] {
    background: #F3E8FF;
    color: #581C87;
    border-color: #7E22CE;
}

.result-rarity-pill[data-tone="rare"] {
    background: #CCFBF1;
    color: #133B4E;
    border-color: #00A896;
}

.result-rarity-pill[data-tone="escaped"] {
    background: #FFE4E6;
    color: #881337;
    border-color: #BE123C;
}

.result-rarity-pill[data-tone="trash"] {
    background: #DCEEF2;
    color: #133B4E;
    border-color: #4A7C8C;
}

.result-coins-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 0;
    background: #E3F6F5;
    border: 2px solid #00A896;
    color: #133B4E;
    font-weight: 800;
    font-size: 0.88rem;
    margin: 6px 0 10px;
}

.fishing-pixel-btn {
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    background: linear-gradient(180deg, #FFD166 0%, #FFB703 100%);
    box-shadow: inset 2px 2px 0 #FFFBEB, inset -2px -2px 0 #C97A00;
    color: var(--fish-parchment-ink);
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.fishing-pixel-btn:active {
    transform: translateY(1px);
}

/* Status Banner */
.fishing-status-banner {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 0;
    font-size: 0.83rem;
    font-weight: 700;
    background: var(--fish-parchment-soft);
    border: 2px solid var(--fish-parchment-line);
    color: var(--fish-parchment-ink);
}

.fishing-status-banner[data-tone="warn"] {
    background: #FFF3BF;
    border-color: #D97706;
    color: #133B4E;
}

.fishing-status-banner[data-tone="error"] {
    background: #FFE4E6;
    border-color: #BE123C;
    color: #881337;
}

.fishing-status-banner[data-tone="success"] {
    background: #E3F6F5;
    border-color: #00A896;
    color: #133B4E;
}

/* Touch & Mouse Primary Action Pad (Square Pixel Bevel - Sunny Gold) */
.fishing-controls-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
}

.fishing-action-pad {
    flex: 1 1 auto;
    min-height: 58px;
    padding: 9px 14px;
    border-radius: 0;
    border: 3px solid var(--fish-parchment-border);
    background: linear-gradient(180deg, #FFD166 0%, #FFB703 100%);
    box-shadow: inset 2px 2px 0 #FFFDF5, inset -2px -3px 0 #C97A00;
    color: var(--fish-parchment-ink);
    text-align: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, background 0.15s ease;
}

.fishing-action-pad:active,
.fishing-action-pad.is-casting,
.fishing-action-pad.is-reeling {
    transform: translateY(1px);
    border-color: #133B4E;
    background: linear-gradient(180deg, #2EC4B6 0%, #00A896 100%);
    box-shadow: inset 2px 2px 0 #CCFBF1, inset -2px -3px 0 #007568;
    color: #FFFFFF;
}

.fishing-action-pad.is-casting .action-pad-sub,
.fishing-action-pad.is-reeling .action-pad-sub {
    color: #E3F6F5;
}

.fishing-action-pad.is-waiting {
    border-color: #1D5B79;
    background: linear-gradient(180deg, #E3F6F5 0%, #BCE7F0 100%);
    box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -3px 0 #7FAEC2;
    color: #133B4E;
}

.fishing-action-pad.is-biting {
    border-color: #133B4E;
    background: linear-gradient(180deg, #FFA384 0%, #FF7B54 100%);
    box-shadow: inset 2px 2px 0 #FFF8E1, inset -2px -3px 0 #C84B27;
    color: #FFFDF5;
    animation: fishingPulse 0.45s infinite alternate;
}

.fishing-action-pad.is-biting .action-pad-sub {
    color: #FFF8E1;
}

@keyframes fishingPulse {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.84;
    }
}

.action-pad-title {
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.action-pad-sub {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--fish-parchment-sub);
    margin-top: 2px;
}

/* Cozy Summer Popup Modal (Equipment, Bag, Shop, FishDex) */
.fishing-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(11, 34, 48, 0.74);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.fishing-modal-backdrop.is-visible {
    display: flex;
}

.fishing-modal-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--fish-parchment);
    color: var(--fish-parchment-ink);
    border: 12px solid transparent;
    border-image-source: url('/assets/fishing/ui/ui_panel_border.png?v=20261127b');
    border-image-slice: 12 fill;
    border-image-repeat: stretch;
    border-radius: 0;
    padding: 10px 10px 12px;
    box-shadow: 0 24px 60px rgba(10, 32, 46, 0.65);
    image-rendering: pixelated;
}

.fishing-modal-header {
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--fish-parchment-border);
    margin-bottom: 12px;
}

.fishing-modal-close-btn {
    width: 38px;
    min-height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    background: linear-gradient(180deg, #FFA384 0%, #FF7B54 100%);
    box-shadow: inset 1.5px 1.5px 0 #FFF8E1, inset -1.5px -2px 0 #C84B27;
    color: #FFFFFF;
    cursor: pointer;
    padding: 0;
}

.fishing-modal-close-btn:hover {
    background: #FF6236;
}

.fishing-modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    padding-right: 4px;
}

.fishing-tabs-bar {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    margin-bottom: 0;
}

@media (max-width: 539.98px) {
    .fishing-modal-backdrop {
        padding: 10px;
    }

    .fishing-tabs-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.fishing-tab-btn {
    border: 2px solid var(--fish-parchment-border);
    background: #E3F6F5;
    box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -2px 0 #90C8D4;
    color: var(--fish-parchment-ink);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 4px;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: 38px;
    white-space: nowrap;
}

.fishing-tab-btn:hover {
    background: #FFF8E1;
}

.fishing-tab-btn.active {
    border-color: var(--fish-parchment-border);
    background: #FFB703;
    box-shadow: inset 2px 2px 0 #FFE680, inset -2px -2px 0 #C97A00;
    color: #133B4E;
}

.fishing-tab-pane {
    display: none;
}

.fishing-tab-pane.active {
    display: block;
}

/* Cozy Pixel Login Required Prompt Modal (stacks cleanly over #fishingMenuModal) */
.fishing-login-backdrop {
    z-index: 1200;
    background: rgba(11, 34, 48, 0.74);
}

.fishing-login-card {
    position: relative;
    width: 100%;
    max-width: 390px;
    background: var(--fish-parchment);
    color: var(--fish-parchment-ink);
    border: 12px solid transparent;
    border-image-source: url('/assets/fishing/ui/ui_panel_border.png?v=20261127b');
    border-image-slice: 12 fill;
    border-image-repeat: stretch;
    border-radius: 0;
    padding: 8px 10px 14px;
    box-shadow: 0 22px 54px rgba(10, 32, 46, 0.75);
    image-rendering: pixelated;
}

.fishing-login-title {
    font-size: 0.96rem;
    font-weight: 900;
    color: var(--fish-parchment-ink);
    letter-spacing: 0.01em;
}

.fishing-login-card .fishing-modal-header {
    justify-content: space-between;
    align-items: center;
}

.fishing-login-body {
    text-align: center;
    padding: 6px 4px 2px;
}

.fishing-login-message {
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 700;
    color: var(--fish-parchment-ink);
}

.fishing-login-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fishing-login-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 36px;
    padding: 6px 16px;
}

.fishing-login-actions .btn-shop-unequip {
    min-height: 36px;
    padding: 6px 16px;
}

/* 3-Slot Summer Equipment Hotbar */
.stardew-equip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

.stardew-equip-slot-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 10px 6px;
    border-radius: 0;
    background: #E3F6F5;
    border: 2px solid var(--fish-parchment-line);
}

.stardew-equip-slot-card.is-equipped {
    background: #FFE066;
    border-color: var(--fish-summer-coral);
    box-shadow: inset 2px 2px 0 #FFFDF5;
}

.stardew-equip-slot-card.is-locked {
    background: #DCEEF2;
    border-style: dashed;
    border-color: #7FAEC2;
}

.stardew-equip-caption {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--fish-parchment-sub);
}

.stardew-equip-name {
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--fish-parchment-ink);
    word-break: break-word;
}

/* Loadout Frame */
.loadout-box {
    background: var(--fish-parchment-soft);
    border: 2px solid var(--fish-parchment-line);
    border-radius: 0;
    padding: 12px;
    margin-bottom: 12px;
}

.text-emerald {
    color: #00A896;
}

.text-parchment-teal {
    color: #1D5B79;
}

/* Cozy Summer Square Shop Cards */
.shop-section-title {
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fish-parchment-ink);
    margin: 8px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--fish-parchment-line);
}

.shop-item-card {
    background: var(--fish-parchment-soft);
    border: 2px solid var(--fish-parchment-line);
    border-radius: 0;
    padding: 9px 10px;
    margin-bottom: 8px;
}

.shop-item-card.is-equipped {
    background: #FFE066;
    border-color: var(--fish-summer-coral);
    box-shadow: inset 2px 2px 0 #FFFDF5;
}

.shop-item-card.is-locked {
    background: #DCEEF2;
    border-style: dashed;
}

.shop-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.shop-item-title {
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--fish-parchment-ink);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.tier-swatch-pip {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--fish-parchment-border);
    border-radius: 0;
    flex-shrink: 0;
}

.bag-qty-pill {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 0;
    background: #E3F6F5;
    border: 1px solid #1D5B79;
    color: #133B4E;
}

.shop-item-specs {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--fish-parchment-sub);
}

.shop-item-desc {
    margin: 6px 0 0;
    font-size: 0.75rem;
    line-height: 1.42;
    color: var(--fish-parchment-sub);
}

.btn-shop-buy,
.btn-shop-equip,
.btn-shop-unequip {
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 900;
    cursor: pointer;
    min-height: 32px;
    white-space: nowrap;
}

.btn-shop-buy {
    background: linear-gradient(180deg, #FFD166 0%, #FFB703 100%);
    box-shadow: inset 1.5px 1.5px 0 #FFFDF5, inset -1.5px -2.5px 0 #C97A00;
    color: #133B4E;
}

.btn-shop-buy:active {
    transform: translateY(1px);
}

.btn-shop-equip {
    background: linear-gradient(180deg, #2EC4B6 0%, #00A896 100%);
    box-shadow: inset 1.5px 1.5px 0 #CCFBF1, inset -1.5px -2.5px 0 #007568;
    color: #FFFFFF;
}

.btn-shop-equip:active {
    transform: translateY(1px);
}

.btn-shop-unequip {
    background: linear-gradient(180deg, #FFA384 0%, #FF7B54 100%);
    box-shadow: inset 1.5px 1.5px 0 #FFF8E1, inset -1.5px -2.5px 0 #C84B27;
    color: #FFFFFF;
}

.shop-chip-active {
    padding: 4px 9px;
    border-radius: 0;
    font-size: 0.71rem;
    font-weight: 800;
    background: #00A896;
    color: #FFFFFF;
    border: 2px solid #133B4E;
}

.shop-chip-locked {
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 800;
    background: var(--fish-parchment-locked);
    border: 2px dashed var(--fish-parchment-line);
    color: var(--fish-parchment-sub);
}

/* Fish Bag & FishDex List (Sunny Summer Gold & Ocean Blue) */
.fish-bag-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 0;
    background: #FFF8E1;
    border: 2px solid var(--fish-parchment-border);
    margin-bottom: 10px;
    color: var(--fish-parchment-ink);
}

.fish-bag-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 0;
    background: var(--fish-parchment-soft);
    border: 2px solid var(--fish-parchment-line);
    color: var(--fish-parchment-ink);
    margin-bottom: 7px;
}

.fish-bag-empty {
    text-align: center;
    padding: 24px 12px;
    border-radius: 0;
    background: #E3F6F5;
    border: 2px dashed var(--fish-parchment-border);
    color: var(--fish-parchment-ink);
}

.fishdex-scroll {
    max-height: 440px;
    overflow-y: auto;
    padding-right: 4px;
}

.fishdex-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 0;
    background: var(--fish-parchment-soft);
    border: 2px solid var(--fish-parchment-line);
    color: var(--fish-parchment-ink);
    margin-bottom: 6px;
}

.fishdex-row.is-caught {
    background: #FFF8E1;
    border-color: var(--fish-summer-coral);
    box-shadow: inset 2px 2px 0 #FFFFFF;
}

.fishdex-row.is-locked {
    background: #EBF5F8;
    border-style: dashed;
    border-color: #7FAEC2;
    color: var(--fish-parchment-sub);
}

.fishdex-silhouette {
    /* Crisp Muted Ocean Teal (#4A7C8C) silhouette on #DCEEF2 locked slot */
    filter: brightness(0) saturate(100%) invert(47%) sepia(24%) saturate(650%) hue-rotate(148deg) brightness(86%) contrast(92%);
    opacity: 0.94;
}

.fishdex-price {
    font-size: 0.76rem;
    font-weight: 900;
    color: #007568;
    white-space: nowrap;
}

.fishdex-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fish-parchment-sub);
}

/* Inline Modal Notice & Interactive Loadout Equipment Picker ("Mục Chọn Trang Bị") */
.fishing-modal-notice {
    margin: 0 0 10px;
    padding: 7px 10px;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 800;
    border: 2px solid var(--fish-parchment-border);
    background: #FFF8E1;
    color: var(--fish-parchment-ink);
}

.fishing-modal-notice[data-tone="warn"] {
    background: #FFF3BF;
    border-color: #D97706;
}

.fishing-modal-notice[data-tone="error"] {
    background: #FFE4E6;
    border-color: #BE123C;
    color: #881337;
}

.fishing-modal-notice[data-tone="success"] {
    background: #E3F6F5;
    border-color: #00A896;
}

.stardew-equip-slot-card {
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.15s ease;
}

.stardew-equip-slot-card:hover {
    transform: translateY(-1px);
    border-color: var(--fish-parchment-border);
}

.stardew-equip-slot-card.is-focus-cat {
    outline: 2px solid #00A896;
    outline-offset: -2px;
}

.loadout-picker-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px solid var(--fish-parchment-line);
}

.loadout-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.loadout-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.loadout-filter-pill {
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    background: #E3F6F5;
    color: var(--fish-parchment-ink);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    cursor: pointer;
}

.loadout-filter-pill:hover {
    background: #FFF8E1;
}

.loadout-filter-pill.active {
    background: #FFB703;
    box-shadow: inset 1.5px 1.5px 0 #FFFDF5, inset -1.5px -1.5px 0 #C97A00;
}

.loadout-picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
}

.loadout-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 0;
    background: #FFF8E1;
    border: 2px solid var(--fish-parchment-line);
    color: var(--fish-parchment-ink);
}

.loadout-item-row.is-equipped {
    background: #FFE066;
    border-color: var(--fish-summer-coral);
    box-shadow: inset 2px 2px 0 #FFFDF5;
}

.loadout-item-row.is-locked {
    background: #DCEEF2;
    border-style: dashed;
}

.loadout-jump-shop-btn {
    border: 2px solid var(--fish-parchment-border);
    border-radius: 0;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 800;
    background: #FFFDF5;
    color: var(--fish-parchment-ink);
    cursor: pointer;
    white-space: nowrap;
}

.loadout-jump-shop-btn:hover {
    background: #FFE066;
}

/* First Discovery Badge, FishDex Milestones & Daily Quests */
.result-discovery-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 0;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #FF7B54;
    color: #FFFDF5;
    border: 2px solid #133B4E;
    box-shadow: inset 1px 1px 0 #FFE066;
    animation: fishingPixelBlink 0.9s steps(2, end) infinite;
}

.quest-ready-pip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    margin-left: 2px;
    border-radius: 0;
    background: #FF7B54;
    color: #FFFDF5;
    border: 1.5px solid #133B4E;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
}

.fishdex-milestones-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

@media (max-width: 479.98px) {
    .fishdex-milestones-bar {
        grid-template-columns: 1fr;
    }
}

.fishdex-milestone-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    padding: 6px 6px;
    border-radius: 0;
    border: 2px dashed #7FAEC2;
    background: #DCEEF2;
    color: var(--fish-parchment-sub);
    font-size: 0.7rem;
    font-weight: 800;
}

.fishdex-milestone-chip.is-unlocked {
    border-style: solid;
    border-color: var(--fish-summer-coral);
    background: #FFE066;
    color: #133B4E;
    box-shadow: inset 1.5px 1.5px 0 #FFFDF5;
}

.daily-quest-card {
    background: #FFF8E1;
    border: 2px solid var(--fish-parchment-line);
    border-radius: 0;
    padding: 9px 10px;
    margin-bottom: 8px;
    color: var(--fish-parchment-ink);
}

.daily-quest-card.is-ready {
    background: #FFE066;
    border-color: var(--fish-summer-coral);
}

.daily-quest-card.is-claimed {
    background: #E3F6F5;
    border-color: #00A896;
}

.quest-progress-track {
    width: 100%;
    height: 10px;
    background: #DCEEF2;
    border: 1.5px solid var(--fish-parchment-border);
    border-radius: 0;
    overflow: hidden;
    margin-top: 6px;
}

.quest-progress-fill {
    height: 100%;
    background: #00A896;
}