/* css/hunter/base.css */


/* =========================
   Hunter Header
========================= */

.hunter-top-bar {
    margin-bottom: 18px;
}

.hunter-title {
    margin-bottom: 4px;
}

.hunter-subtitle {
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.line-login-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;

    background: #06c755;
    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 199, 85, .22);
}

.line-login-btn:hover {
    opacity: .92;
}

/* =========================
   Hunter Preview Card
========================= */

.hunter-preview-card {
    position: relative;
    overflow: hidden;

    padding: 22px;
    border-radius: 24px;

    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, .24), transparent 34%),
        radial-gradient(circle at bottom left, rgba(249, 115, 22, .08), transparent 32%),
        linear-gradient(180deg, #fffaf0, #ffffff);

    border: 2px solid #f6c453;
    box-shadow:
        0 3px 0 #d97706,
        0 14px 30px rgba(15, 23, 42, .12);
}

.hunter-preview-badge {
    display: inline-flex;
    align-items: center;

    margin-bottom: 12px;
    padding: 5px 10px;

    border-radius: 999px;

    background: #111827;
    color: #facc15;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
}

.hunter-preview-card h1 {
    margin: 0 0 8px;

    color: #111827;
    font-size: 25px;
    font-weight: 900;
}

.hunter-preview-card p {
    max-width: 680px;
    margin: 0 0 18px;

    color: #6b7280;

    line-height: 1.75;
    font-size: 15px;
    font-weight: 700;
}

/* =========================
   Shared Section Panel
========================= */

.hunter-character-section,
.glove-preview-section {
    margin: 18px 0;
    padding: 14px;

    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(253, 230, 138, .85);
}

.hunter-section-title,
.glove-preview-title {
    margin-bottom: 12px;

    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

/* =========================
   Hunter Game Shell
========================= */

.hunter-game-shell {
    display: flex;
    flex-direction: column;

    height: min(720px, calc(100svh - 170px));
    min-height: 560px;

    overflow: hidden;

    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, .12), transparent 36%),
        rgba(255, 255, 255, .58);

    border: 2px solid rgba(243, 213, 139, .9);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 3px 0 #d6a94f,
        0 10px 24px rgba(15, 23, 42, .08);
}

.hunter-game-views {
    flex: 1 1 auto;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 14px;
}

.hunter-bottom-nav {
    flex: 0 0 auto;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;

    padding: 8px;

    background:
        linear-gradient(180deg, rgba(255, 251, 235, .92), rgba(255, 247, 237, .98));

    border-top: 2px solid #f3d58b;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 -8px 18px rgba(15, 23, 42, .06);
}

.hunter-bottom-nav-btn {
    appearance: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    min-width: 0;
    min-height: 54px;

    padding: 7px 4px;
    border-radius: 14px;

    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(253, 230, 138, .9);

    color: #92400e;
    font-family: inherit;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .85),
        0 2px 0 rgba(217, 119, 6, .18);

    transition:
        transform .14s ease,
        background .14s ease,
        border-color .14s ease,
        box-shadow .14s ease;
}

.hunter-bottom-nav-btn span {
    font-size: 18px;
    line-height: 1;
}

.hunter-bottom-nav-btn strong {
    display: block;

    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.hunter-bottom-nav-btn:hover {
    transform: translateY(-1px);
    border-color: #f59e0b;
}

.hunter-bottom-nav-btn.active {
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, .22), transparent 42%),
        #111827;

    border-color: #f59e0b;
    color: #facc15;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 3px 0 rgba(0, 0, 0, .28),
        0 8px 16px rgba(15, 23, 42, .12);
}

.hunter-bottom-nav-btn:active {
    transform: translateY(1px);
}

.hunter-game-views {
    min-height: 0;
}

.hunter-game-view {
    min-height: 0;
    animation: hunterGameViewIn .18s ease;
}

.hunter-game-view[hidden] {
    display: none !important;
}

.hunter-game-view[data-hunter-view="archive"] {
    display: block;
}

.hunter-game-view[data-hunter-view="archive"] .hunter-lore-content {
    overflow: visible;
}

/* =========================
   Hunter boot loading gate
========================= */

.hunter-boot-loader {
    display: none;
}

.hunter-page.hunter-boot-loading .hunter-game-shell,
.hunter-page.hunter-is-booting .hunter-game-shell,
.hunter-page.hunter-boot-failed .hunter-game-shell {
    display: none;
}

.hunter-page.hunter-boot-loading .hunter-tutorial-task-card,
.hunter-page.hunter-boot-loading .hunter-tutorial-overlay,
.hunter-page.hunter-boot-loading .hunter-tutorial-unlock-burst,
.hunter-page.hunter-is-booting .hunter-tutorial-task-card,
.hunter-page.hunter-is-booting .hunter-tutorial-overlay,
.hunter-page.hunter-is-booting .hunter-tutorial-unlock-burst,
.hunter-page.hunter-boot-failed .hunter-tutorial-task-card,
.hunter-page.hunter-boot-failed .hunter-tutorial-overlay,
.hunter-page.hunter-boot-failed .hunter-tutorial-unlock-burst {
    display: none !important;
}

.hunter-page.hunter-boot-loading .hunter-boot-loader,
.hunter-page.hunter-is-booting .hunter-boot-loader,
.hunter-page.hunter-boot-failed .hunter-boot-loader {
    display: grid;
    place-items: center;
    height: min(720px, calc(100svh - 170px));
    min-height: 560px;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 236, 169, .32), transparent 34%),
        radial-gradient(circle at 70% 72%, rgba(251, 146, 60, .16), transparent 34%),
        linear-gradient(180deg, rgba(255, 251, 235, .92), rgba(255, 255, 255, .82));
    border: 2px solid rgba(243, 213, 139, .9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 3px 0 #d6a94f,
        0 10px 24px rgba(15, 23, 42, .08);
}

.hunter-boot-loader-card {
    width: min(360px, calc(100vw - 56px));
    padding: 22px 20px 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(255, 213, 116, .24), transparent 44%),
        linear-gradient(180deg, rgba(39, 27, 20, .98), rgba(15, 23, 42, .96));
    border: 2px solid rgba(255, 222, 139, .84);
    color: #fff7db;
    text-align: center;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, .26),
        0 0 22px rgba(255, 193, 72, .16),
        inset 0 1px 0 rgba(255,255,255,.16);
    animation: hunterBootCardIn .36s ease-out both;
}

.hunter-boot-loader-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 20px;
    background: rgba(255, 221, 135, .15);
    font-size: 34px;
    animation: hunterBootDog 1.05s ease-in-out infinite;
}

.hunter-boot-loader-title {
    color: #ffd66f;
    font-size: 20px;
    font-weight: 1000;
}

.hunter-boot-loader-text {
    margin-top: 8px;
    color: rgba(255, 247, 219, .84);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.65;
}


/* Backward-compatible aliases for older boot error markup. */
.hunter-boot-card {
    width: min(360px, calc(100vw - 56px));
    padding: 22px 20px 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top, rgba(255, 213, 116, .24), transparent 44%),
        linear-gradient(180deg, rgba(39, 27, 20, .98), rgba(15, 23, 42, .96));
    border: 2px solid rgba(255, 222, 139, .84);
    color: #fff7db;
    text-align: center;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, .26),
        0 0 22px rgba(255, 193, 72, .16),
        inset 0 1px 0 rgba(255,255,255,.16);
}
.hunter-boot-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 20px;
    background: rgba(255, 221, 135, .15);
    font-size: 34px;
}
.hunter-boot-title {
    color: #ffd66f;
    font-size: 20px;
    font-weight: 1000;
}
.hunter-boot-text {
    margin-top: 8px;
    color: rgba(255, 247, 219, .84);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.65;
}

.hunter-boot-loader-bar {
    position: relative;
    height: 10px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
}

.hunter-boot-loader-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fde68a, #f59e0b, #facc15);
    box-shadow: 0 0 16px rgba(250, 204, 21, .42);
    animation: hunterBootBar 1.08s ease-in-out infinite;
}

.hunter-page.hunter-boot-ready .hunter-game-shell {
    animation: hunterGameReadyIn .28s ease-out both;
}

@keyframes hunterBootCardIn {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hunterBootDog {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-6px) rotate(4deg); }
}

@keyframes hunterBootBar {
    0% { transform: translateX(-110%); }
    55% { transform: translateX(95%); }
    100% { transform: translateX(240%); }
}

@keyframes hunterGameReadyIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .hunter-page.hunter-boot-loading .hunter-boot-loader,
.hunter-page.hunter-is-booting .hunter-boot-loader,
.hunter-page.hunter-boot-failed .hunter-boot-loader {
        height: min(690px, calc(100svh - 145px));
        min-height: 500px;
    }
}

/* =========================
   Hunter Internal Tabs
========================= */

.hunter-subtab-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px;
    border: 1px solid rgba(245, 158, 11, .24);
    border-radius: 18px;
    background: rgba(255, 251, 235, .72);
}

.hunter-subtab-btn {
    appearance: none;
    min-width: 0;
    border: 1px solid rgba(253, 230, 138, .9);
    border-radius: 14px;
    padding: 10px 8px;
    cursor: pointer;
    color: #92400e;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    background: rgba(255, 255, 255, .76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 0 rgba(217, 119, 6, .12);
    transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}

.hunter-subtab-btn.active {
    color: #facc15;
    border-color: #f59e0b;
    background:
        radial-gradient(circle at top, rgba(251, 191, 36, .22), transparent 46%),
        #111827;
}

.hunter-subtab-btn:active {
    transform: translateY(1px);
}

.hunter-subtab-panel {
    display: grid;
    gap: 14px;
}

.hunter-subtab-panel[hidden] {
    display: none !important;
}

.hunter-archive-shell {
    display: grid;
    gap: 14px;
}

.line-login-btn.is-bound {
    background: #111827;
    color: #bbf7d0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 4px 0 rgba(0, 0, 0, .28),
        0 8px 18px rgba(15, 23, 42, .14);
}

.line-login-btn.is-bound:hover {
    opacity: .96;
}

/* =========================
   Hunter LINE switch modal
========================= */

body.hunter-line-modal-open {
    overflow: hidden;
}

.hunter-line-switch-modal {
    position: fixed;
    inset: 0;
    z-index: 9600;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background:
        radial-gradient(circle at 50% 22%, rgba(6, 199, 85, .24), transparent 28%),
        rgba(6, 9, 16, .68);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease-out;
}

.hunter-line-switch-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.hunter-line-switch-card {
    position: relative;
    width: min(430px, calc(100vw - 32px));
    max-height: min(560px, calc(100svh - 36px));
    overflow-y: auto;
    box-sizing: border-box;
    padding: 20px 18px 18px;
    border: 2px solid rgba(187, 247, 208, .74);
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(34, 197, 94, .2), transparent 42%),
        linear-gradient(180deg, rgba(24, 36, 28, .98), rgba(17, 24, 39, .98));
    color: #f0fdf4;
    text-align: center;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, .52),
        0 0 24px rgba(34, 197, 94, .18),
        inset 0 1px 0 rgba(255, 255, 255, .16);
    transform: translateY(14px) scale(.96);
    transition: transform .2s cubic-bezier(.22,.9,.24,1.08);
}

.hunter-line-switch-modal.is-visible .hunter-line-switch-card {
    transform: translateY(0) scale(1);
}

.hunter-line-switch-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: rgba(34, 197, 94, .16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
    font-size: 26px;
}

.hunter-line-switch-kicker {
    margin-bottom: 5px;
    color: #86efac;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .08em;
}

.hunter-line-switch-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 1000;
    line-height: 1.25;
}

.hunter-line-switch-text {
    margin-top: 10px;
    color: rgba(240, 253, 244, .82);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.65;
}

.hunter-line-switch-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.hunter-line-switch-pill {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 9px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
}

.hunter-line-switch-pill span {
    color: rgba(240, 253, 244, .72);
    font-size: 11px;
    font-weight: 900;
}

.hunter-line-switch-pill strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    font-weight: 1000;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hunter-line-switch-pill.is-line {
    border-color: rgba(134, 239, 172, .42);
    background: rgba(34, 197, 94, .14);
}

.hunter-line-switch-arrow {
    color: #86efac;
    font-size: 18px;
    font-weight: 1000;
}

.hunter-line-switch-warning {
    margin-top: 12px;
    padding: 10px 11px;
    border: 1px solid rgba(253, 230, 138, .34);
    border-radius: 16px;
    background: rgba(253, 230, 138, .08);
    color: #fef3c7;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
    text-align: left;
}

.hunter-line-switch-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 15px;
}

.hunter-line-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 1000;
    cursor: pointer;
}

.hunter-line-switch-btn.is-primary {
    border: 0;
    background: linear-gradient(135deg, #bbf7d0, #22c55e);
    color: #052e16;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.45),
        0 4px 0 rgba(20, 83, 45, .86),
        0 10px 18px rgba(0, 0, 0, .22);
}

.hunter-line-switch-btn.is-secondary {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #f0fdf4;
}

.hunter-line-switch-btn:active {
    transform: translateY(2px);
}

.hunter-line-switch-btn:disabled,
.hunter-line-switch-btn.is-loading {
    opacity: .72;
    cursor: wait;
}

@media (max-width: 420px) {
    .hunter-line-switch-card {
        padding: 18px 14px 15px;
        border-radius: 21px;
    }

    .hunter-line-switch-title {
        font-size: 18px;
    }

    .hunter-line-switch-text {
        font-size: 13px;
    }

    .hunter-line-switch-compare {
        grid-template-columns: 1fr;
    }

    .hunter-line-switch-arrow {
        transform: rotate(90deg);
    }
}

body.hunter-line-login-moved {
    overflow: hidden;
}

.hunter-line-login-moved-card .hunter-line-switch-warning {
    text-align: center;
}

/* v78: LINE switch modal mobile safe area / overflow guard */
@media (max-width: 640px) {
    .hunter-line-switch-modal {
        z-index: 9800;
        align-items: center;
        justify-items: center;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        overflow: auto;
        overscroll-behavior: contain;
    }

    .hunter-line-switch-card {
        width: min(100%, calc(100vw - 24px));
        max-width: 430px;
        max-height: calc(100svh - 24px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hunter-line-switch-actions {
        position: sticky;
        bottom: 0;
        padding-top: 8px;
        background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, .98) 32%);
    }
}

/* v79: hard guard for LINE switch modal on mobile.
   Keep the switch confirmation centered and above tutorial overlays. */
.hunter-line-switch-modal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 12000 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
}

.hunter-line-switch-card {
    box-sizing: border-box;
    margin: auto;
}

@media (max-width: 640px) {
    .hunter-line-switch-modal {
        padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
    }

    .hunter-line-switch-card {
        width: min(430px, calc(100vw - 20px)) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 24px) !important;
        overflow-y: auto !important;
        transform-origin: center center;
    }
}
