/* ========================================
   フィッシング・エボリューション
   メインスタイルシート
   ======================================== */

/* ----------------------------------------
   CSS変数（テーマ設定）
   ---------------------------------------- */
:root {
    /* カラーパレット (Warm Wood Theme) */
    --primary-color: #0ea5e9;
    /* 水色（釣り要素用） */
    --primary-dark: #0284c7;
    --primary-light: #7dd3fc;
    --secondary-color: #8d6e63;
    /* 木の茶色 */
    --secondary-dark: #5d4037;
    --accent-color: #ffd700;
    /* ゴールド */
    --accent-yellow: #ffd700;
    --danger-color: #ef4444;
    --border-color: #5d4037;
    /* 濃い茶色の枠 */
    --text-light: #efebe9;

    /* 海のグラデーション（釣り画面用は維持） */
    --ocean-dark: #0f172a;
    --ocean-mid: #0369a1;
    --ocean-light: #0ea5e9;
    --ocean-surface: #7dd3fc;

    /* UI色 - Warm Wood */
    --bg-dark: #3e2723;
    /* 濃いこげ茶背景 */
    --bg-card: rgba(62, 39, 35, 0.95);
    /* ほぼ不透明な木目パネル */
    --text-primary: #efebe9;
    /* オフホワイト */
    --text-secondary: #d7ccc8;
    /* 明るいベージュ */

    /* ランクカラー (新仕様) */
    --rarity-D: #bcaaa4;
    /* 銅/木 */
    --rarity-C: #22c55e;
    --rarity-B: #3b82f6;
    --rarity-A: #a855f7;
    --rarity-S: #f59e0b;

    /* レア度カラー (互換用) */
    --rarity-common: var(--rarity-D);
    --rarity-uncommon: var(--rarity-C);
    --rarity-rare: var(--rarity-B);
    --rarity-epic: var(--rarity-A);
    --rarity-legendary: var(--rarity-S);

    /* フォント */
    --font-main: 'Segoe UI', system-ui, sans-serif;

    /* スペーシング */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* ボーダー */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* シャドウ (Warm) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.2);
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ----------------------------------------
   Material Icons スタイル
   ---------------------------------------- */
.material-icons {
    font-size: inherit;
    vertical-align: middle;
}

.status-icon .material-icons,
.nav-icon .material-icons,
.btn-icon .material-icons {
    font-size: 20px;
}

.title-icon .material-icons {
    font-size: 48px;
}

/* 星のスタイル */
.star-filled,
.rod-stars .material-icons[class*="star"]:not(.star-empty) {
    color: #fbbf24;
}

.star-empty,
.rod-stars .material-icons.star-empty {
    color: rgba(255, 255, 255, 0.3);
}

.stars-display .material-icons {
    font-size: 24px;
}

.star-icon {
    font-size: 14px;
    vertical-align: baseline;
}

/* ========================================
   釣り結果オーバーレイ（カードUI）
   ======================================== */

/* オーバーレイを「クリック可能」な見た目にする */
.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* カード自体のスタイル */
.result-card {
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    /* 木目調 */
    border: 4px solid #4e342e;
    /* 濃い茶枠 */
    border-radius: 28px;
    width: 85%;
    max-width: 300px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    animation: cardSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    color: #efebe9;
}

.result-card::before {
    /* 装飾 - 左上 */
    content: '';
    position: absolute;
    top: 14px;
    left: 14px;
    width: 10px;
    height: 10px;
    background: #3e2723;
    border-radius: 50%;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.result-card::after {
    /* 装飾 - 右上 */
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #3e2723;
    border-radius: 50%;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.result-overlay>* {
    pointer-events: none;
}

@keyframes cardSlideUp {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* カードヘッダー */
.card-header {
    font-size: 0.8rem;
    font-weight: 900;
    color: #ffd700;
    /* Gold */
    text-shadow: 1px 1px 0 #3e2723;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* 結果表示アニメーション */
.result-animation {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* アイコンサークル */
.icon-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--rarity-C), #16a34a);
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.2);
    /* 枠追加 */
    animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* レア度別アイコンサークル背景色 */
.icon-circle.rarity-D {
    background: linear-gradient(145deg, #bcaaa4, #8d6e63);
    /* 銅/木 */
    box-shadow: 0 10px 40px rgba(141, 110, 99, 0.4);
}

.icon-circle.rarity-C {
    background: linear-gradient(145deg, var(--rarity-C), #16a34a);
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.4);
}

.icon-circle.rarity-B {
    background: linear-gradient(145deg, var(--rarity-B), #2563eb);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.icon-circle.rarity-A {
    background: linear-gradient(145deg, var(--rarity-A), #9333ea);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.4);
}

.icon-circle.rarity-S {
    background: linear-gradient(145deg, var(--rarity-S), #d97706);
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.5);
    animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), legendaryPulse 2s ease-in-out infinite;
}

.icon-circle.type-failed {
    background: linear-gradient(145deg, #5d4037, #3e2723);
    /* 焦げ茶 */
    box-shadow: 0 10px 40px rgba(62, 39, 35, 0.4);
}

@keyframes iconPop {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes legendaryPulse {

    0%,
    100% {
        box-shadow: 0 10px 40px rgba(245, 158, 11, 0.5);
    }

    50% {
        box-shadow: 0 10px 60px rgba(245, 158, 11, 0.7), 0 0 80px rgba(245, 158, 11, 0.4);
    }
}

/* 結果アイコン */
.result-icon {
    font-size: 64px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.result-icon.escaped {
    opacity: 0.7;
}

/* スパークルアイコン */
.sparkle-icon {
    font-size: 32px;
    color: #fbbf24;
    position: absolute;
    top: -5px;
    right: -5px;
    animation: sparkle 0.6s ease-out;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.8);
}

@keyframes sparkle {
    from {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 逃げ雲アイコン */
.escape-cloud {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    top: -10px;
    right: -10px;
    animation: cloudFloat 2s ease-in-out infinite;
}

@keyframes cloudFloat {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-5px);
        opacity: 0.9;
    }
}

/* レア度グロー効果 */
.rarity-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
}

/* 結果コンテンツ */
.result-content {
    margin-bottom: 16px;
}

/* レア度バッジ */
.rarity-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    color: white;
    background: var(--rarity-C);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rarity-badge.rarity-D {
    background: var(--rarity-D);
}

.rarity-badge.rarity-C {
    background: var(--rarity-C);
}

.rarity-badge.rarity-B {
    background: var(--rarity-B);
}

.rarity-badge.rarity-A {
    background: var(--rarity-A);
}

.rarity-badge.rarity-S {
    background: var(--rarity-S);
}

/* 魚の名前 */
.result-card .fish-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #efebe9;
    /* Off-white */
    margin: 8px 0 16px;
    text-shadow: 1px 1px 0 #3e2723;
}

.fish-name-small {
    font-weight: bold;
    color: #d7ccc8;
    /* Beige */
}

/* 統計グリッド */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: rgba(62, 39, 35, 0.6);
    /* Darker wood */
    border: 2px solid #5d4037;
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-item .label {
    font-size: 0.65rem;
    font-weight: bold;
    color: #d7ccc8;
    /* Beige */
    letter-spacing: 0.1em;
}

.stat-item .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd700;
    /* Gold */
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* 失敗メッセージ */
.fail-message {
    font-size: 0.95rem;
    color: #d7ccc8;
    /* Beige */
    line-height: 1.6;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

/* 閉じるヒント */
.tap-hint {
    margin-top: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.1em;
    animation: hintPulse 2s infinite;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}



/* ----------------------------------------
   画面ベース
   ---------------------------------------- */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    /* Safe Area Adjustment for Notches */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.screen.active {
    display: flex;
}

/* ----------------------------------------
   スタート画面
   ---------------------------------------- */
#start-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, var(--ocean-dark) 0%, var(--ocean-mid) 50%, var(--ocean-light) 100%);
}

.ocean-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C150,120 350,0 600,60 C850,120 1050,0 1200,60 L1200,120 L0,120 Z' fill='%237dd3fc' fill-opacity='0.3'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: wave-move 8s linear infinite;
}

.wave2 {
    opacity: 0.6;
    animation-duration: 10s;
    animation-delay: -2s;
}

.wave3 {
    opacity: 0.4;
    animation-duration: 12s;
    animation-delay: -4s;
}

@keyframes wave-move {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.start-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--spacing-xl);
}

.game-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.title-icon {
    font-size: 80px;
    animation: bobbing 2s ease-in-out infinite;
}

@keyframes bobbing {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.title-text {
    font-size: 48px;
    font-weight: 700;
    /* Gold Gradient */
    background: linear-gradient(135deg, #ffd700 0%, #ff6f00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    letter-spacing: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.title-sub {
    font-size: 24px;
    font-weight: 500;
    color: var(--ocean-surface);
    letter-spacing: 8px;
    text-transform: uppercase;
}

.start-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ----------------------------------------
   ボタンスタイル
   ---------------------------------------- */
.btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 20px;
    font-weight: 700;
    color: #efebe9;
    /* Warm Blue Gradient for Primary Action */
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: 2px solid #0c4a6e;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #0c4a6e, 0 8px 16px rgba(0, 0, 0, 0.4);
    /* 立体的 */
}

.btn-main:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 0 #0c4a6e, 0 12px 20px rgba(0, 0, 0, 0.5);
}

.btn-main:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0c4a6e, 0 4px 6px rgba(0, 0, 0, 0.4);
}

.btn-continue {
    /* Warm Green */
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    border: 2px solid #1b5e20;
    box-shadow: 0 4px 0 #1b5e20, 0 8px 16px rgba(0, 0, 0, 0.4);
}

.hidden {
    display: none !important;
}

.btn-nav,
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 14px;
    font-weight: 600;
    color: #5d4037;
    /* Dark Brown Text */
    background: #efebe9;
    /* Off-white/Paper */
    border: 2px solid #a1887f;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 0 #a1887f, 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-nav:hover,
.btn-action:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #a1887f, 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-nav:active,
.btn-action:active {
    transform: translateY(2px);
    box-shadow: none;
}

.btn-action {
    /* Action button accent (Gold) */
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    border-color: #f57f17;
    color: #3e2723;
    box-shadow: 0 2px 0 #f57f17, 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-action:hover {
    background: linear-gradient(135deg, #ffca28 0%, #ffc107 100%);
    box-shadow: 0 4px 0 #f57f17, 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-action:active {
    box-shadow: none;
}

/* ----------------------------------------
   釣り画面
   ---------------------------------------- */
#fishing-screen {
    position: relative;
    background: linear-gradient(180deg,
            #87CEEB 0%,
            /* 空 */
            #7dd3fc 20%,
            /* 明るい海 */
            #38bdf8 30%,
            /* 水平線付近 */
            #0284c7 35%,
            /* 水面 */
            #0369a1 50%,
            /* 水中上層 */
            #0c4a6e 100%
            /* 水中深層 */
        );
    overflow: hidden;
}

/* 水面の反射効果 */
#fishing-screen::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 20%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.4) 80%,
            transparent 100%);
    z-index: 5;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* 水中のパーティクル効果 */
#fishing-screen::after {
    content: '';
    position: absolute;
    top: 32%;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    background-image: radial-gradient(circle at 50% 50%, white 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

/* ゲーム画面風フレーム（新規追加） */
.fishing-area-frame {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 90;
}

/* ----------------------------------------
   フローティングステータス
   ---------------------------------------- */
.floating-status {
    position: absolute;
    top: calc(var(--spacing-md) + env(safe-area-inset-top));
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: auto;
}

.floating-status-left {
    left: var(--spacing-md);
}

.floating-status-right {
    right: var(--spacing-md);
    align-items: flex-end;
}

.floating-status-bottom-left {
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    top: auto;
    /* Override top */
    align-items: flex-start;
    flex-direction: column;
    /* Town -> Bait -> Rod */
    gap: var(--spacing-md);
}

/* ステータスピル（左側） - 木目調 */
.status-pill {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px 20px;
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    border: 3px solid #4e342e;
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    min-width: 140px;
    transition: transform 0.2s ease;
    color: #efebe9;
}

.status-pill:hover {
    transform: translateX(5px);
    filter: brightness(1.1);
}

/* 個別の色設定（アイコンとテキストに適用） */
.status-pill:nth-child(1) .status-icon {
    color: #fbbf24;
    /* Money Gold */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-pill:nth-child(2) .status-icon {
    color: #ef4444;
    /* Power Red */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-pill:nth-child(3) .status-icon {
    color: #3b82f6;
    /* Inventory Blue */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-value {
    font-weight: 700;
    font-family: var(--font-main);
    text-shadow: 0 1px 2px rgba(78, 52, 46, 0.5);
}


.status-pill .status-icon {
    font-size: 20px;
    color: #f8fafc;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.status-pill .status-value {
    font-family: 'Roboto Mono', monospace;
    /* 数字を見やすく */
    font-weight: 700;
    color: white;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* フローティングボタン（右上） */
.floating-btn {
    min-width: 56px;
    height: 56px;
    display: flex;
    flex-direction: column;
    /* アイコンと文字を縦に */
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ocean-dark), var(--ocean-mid));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 60;
    padding: 0 8px;
    /* 文字用に余白 */
}

.btn-town {
    background: linear-gradient(135deg, #059669, #047857);
    /* 緑系（Townっぽい色） */
}

.btn-label {
    font-size: 10px;
    font-weight: 700;
    margin-top: -2px;
    color: white;
}

.floating-btn:hover {
    background: var(--primary-color);
    border-color: white;
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 20px var(--primary-light);
}

/* ステータスカード（右側） - 情報パネル風 */
/* ステータスカード（右側） - 情報パネル風 */
.status-card {
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.85);
    border: none;
    border-right: 3px solid var(--primary-light);
    border-radius: 4px;
    text-align: right;
    min-width: 100px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* 左側のステータスカード用オーバーライド */
.floating-status-bottom-left .status-card {
    border-right: none;
    border-left: 3px solid var(--primary-light);
    text-align: left;
}

.status-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.status-value-lg {
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* 竿バッジ（左下） - フレックスアイテムとして動作するように調整 */
/* Old rod-badge rule removed */
.rod-badge .rod-name {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 14px;
    text-shadow: 0 0 5px rgba(14, 165, 233, 0.5);
    letter-spacing: 1px;
}

.rod-badge .rod-stars {
    color: var(--accent-color);
    letter-spacing: 2px;
    font-size: 14px;
    filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.5));
}



/* ----------------------------------------
   1人称視点の釣り竿（SVG版）
   ---------------------------------------- */
.fishing-rod-view {
    position: absolute;
    bottom: -50px;
    right: 15%;
    z-index: 10;
    transform-origin: 90% 100%;
    transition: transform 0.3s ease-out;
    pointer-events: none;

    /* アニメーション姿勢の基準値 */
    --rod-idle-rot: 30deg;
    --rod-idle-y: 60px;
    --rod-waiting-rot: -10deg;
    --rod-waiting-y: 0px;
    --rod-hit-rot: -25deg;
    --rod-hit-y: 15px;
    --rod-strike-rot: 20deg;
    --rod-strike-y: -10px;
}

/* SVG模時の対应: rod-shaft ・ rod-line を非表示 */
.rod-shaft,
.rod-line {
    display: none;
}

/* SVG本体のサイズ */
.rod-svg {
    width: 60px;
    height: 520px;
    overflow: visible;
    /* くびれ演出を画面外に出す */
    display: block;
    filter: drop-shadow(-2px 0 4px rgba(0, 0, 0, 0.4));
}

/* SVGのパスが切り替わる際に、滑らかに変形させる */
.rod-svg path {
    transition: d 0.2s ease-out;
}

/* リール（旧::after代替） */
.rod-reel {
    position: absolute;
    bottom: 80px;
    left: -3px;
    width: 36px;
    height: 36px;
    background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b);
    border-radius: 50%;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6), inset 0 1px 3px rgba(255, 255, 255, 0.3);
    border: 2px solid #4e342e;
}

.rod-line {
    display: none;
    /* SVG内の rod-line-path が代替 */
}

/* ----------------------------------------
   竿のアニメーション状態（全体アニメーション + SVGしなり）
   ---------------------------------------- */

/* 待機（手前で持っている） */
.fishing-rod-view.idle {
    transform: rotate(var(--rod-idle-rot)) translateY(var(--rod-idle-y));
    transition: all 0.5s ease-out;
}

.fishing-rod-view.idle #rod-path-left {
    d: path("M 18 510 Q 20 300 4 0");
}

.fishing-rod-view.idle #rod-path-right {
    d: path("M 22 510 Q 24 300 8 0");
}

.fishing-rod-view.idle #rod-highlight {
    d: path("M 20 510 Q 22 300 6 0");
}

/* キャスト（投げる） */
.fishing-rod-view.casting {
    /* 0.8秒から0.5秒へ短縮してサクサク感アップ */
    animation: rodCast 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rodCast {
    0% {
        transform: rotate(var(--rod-idle-rot)) translateY(var(--rod-idle-y));
    }

    30% {
        transform: rotate(60deg) translateY(120px);
    }

    /* 振りかぶり */
    45% {
        transform: rotate(65deg) translateY(130px);
    }

    /* ため */
    100% {
        transform: rotate(var(--rod-waiting-rot)) translateY(var(--rod-waiting-y));
    }

    /* 着水位置 */
}

/* 待機（水面に垂らしている） */
.fishing-rod-view.waiting {
    transform: rotate(var(--rod-waiting-rot)) translateY(var(--rod-waiting-y));
    animation: rodBreathe 4s ease-in-out infinite;
    transition: transform 0.5s ease-out;
    /* キャストからの着地用 */
}

.fishing-rod-view.waiting #rod-path-left {
    d: path("M 18 510 Q 20 300 4 0");
}

.fishing-rod-view.waiting #rod-path-right {
    d: path("M 22 510 Q 24 300 8 0");
}

.fishing-rod-view.waiting #rod-highlight {
    d: path("M 20 510 Q 22 300 6 0");
}

@keyframes rodBreathe {

    0%,
    100% {
        transform: rotate(var(--rod-waiting-rot)) translateY(var(--rod-waiting-y));
    }

    50% {
        transform: rotate(-8deg) translateY(2px);
    }
}

/* 予兆（ピクピク） → 载荷载か: 微小しなり */
.fishing-rod-view.nibble {
    /* waiting状態と角度を揃えてワープを防止 */
    transform: rotate(var(--rod-waiting-rot)) translateY(var(--rod-waiting-y));
    /* 0.3秒から0.15秒へ短縮し、細かくピクピクさせる */
    animation: rodNibble 0.15s ease-in-out infinite;
}

.fishing-rod-view.nibble #rod-path-left {
    d: path("M 18 510 Q 25 280 4 0");
}

.fishing-rod-view.nibble #rod-path-right {
    d: path("M 22 510 Q 29 280 8 0");
}

.fishing-rod-view.nibble #rod-highlight {
    d: path("M 20 510 Q 27 280 6 0");
}

@keyframes rodNibble {

    0%,
    100% {
        transform: rotate(var(--rod-waiting-rot)) translateY(var(--rod-waiting-y));
    }

    50% {
        transform: rotate(-14deg) translateY(4px);
    }
}

/* ヒット（大きくしなる） → 高荷重: しなり大 */
.fishing-rod-view.hit {
    animation: rodHit 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

/* しなり強: 制御点を右に大きくシフト */
.fishing-rod-view.hit #rod-path-left {
    d: path("M 18 510 Q 65 240 4 0");
}

.fishing-rod-view.hit #rod-path-right {
    d: path("M 22 510 Q 69 240 8 0");
}

.fishing-rod-view.hit #rod-highlight {
    d: path("M 20 510 Q 67 240 6 0");
}

@keyframes rodHit {
    0% {
        /* waiting/nibbleの角度から自然に繋げる */
        transform: rotate(var(--rod-waiting-rot)) translateY(var(--rod-waiting-y));
    }

    100% {
        transform: rotate(-15deg) translateY(10px);
    }
}

/* 合わせ（ストライク） → はじきで弶のように戦わる: 強載から釋放 */
.fishing-rod-view.strike {
    /* 0.25秒から0.15秒へ短縮し、「ビシッ！」の鋭さアップ */
    animation: rodStrike 0.15s ease-out forwards;
}

.fishing-rod-view.strike #rod-path-left {
    d: path("M 18 510 Q 45 280 4 0");
}

.fishing-rod-view.strike #rod-path-right {
    d: path("M 22 510 Q 49 280 8 0");
}

.fishing-rod-view.strike #rod-highlight {
    d: path("M 20 510 Q 47 280 6 0");
}

@keyframes rodStrike {
    0% {
        transform: rotate(-15deg) translateY(10px);
    }

    40% {
        transform: rotate(-25deg) translateY(18px);
    }

    /* 弓なり最大 */
    to {
        transform: rotate(15deg) translateY(-5px);
    }

    /* 振り切り */
}

/* バトル（引っ張り合い） → 高荷重が続く: しなり灯を微振動 */
.fishing-rod-view.battle {
    animation: rodBattle 0.18s linear infinite;
}

.fishing-rod-view.battle #rod-path-left {
    d: path("M 18 510 Q 65 240 4 0");
}

.fishing-rod-view.battle #rod-path-right {
    d: path("M 22 510 Q 69 240 8 0");
}

.fishing-rod-view.battle #rod-highlight {
    d: path("M 20 510 Q 67 240 6 0");
}

@keyframes rodBattle {
    0% {
        transform: rotate(-15deg) translateY(10px);
    }

    25% {
        transform: rotate(-16.5deg) translateY(12px) scaleX(0.98);
    }

    50% {
        transform: rotate(-13.5deg) translateY(8px) scaleX(1.02);
    }

    75% {
        transform: rotate(-15.8deg) translateY(11px) scaleX(0.99);
    }

    100% {
        transform: rotate(-15deg) translateY(10px);
    }
}

/* 成功（引き上げ） → 荷重が消える: くびれから直線へ房張り */
.fishing-rod-view.success {
    /* 0.9秒から0.6秒へ短縮し、硬直時間を削減 */
    animation: rodSuccess 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fishing-rod-view.success #rod-path-left {
    d: path("M 18 510 Q 20 300 4 0");
}

.fishing-rod-view.success #rod-path-right {
    d: path("M 22 510 Q 24 300 8 0");
}

.fishing-rod-view.success #rod-highlight {
    d: path("M 20 510 Q 22 300 6 0");
}

@keyframes rodSuccess {
    0% {
        transform: rotate(-15deg) translateY(10px);
    }

    30% {
        transform: rotate(-22deg) translateY(18px);
    }

    /* 引っ張り最大 */
    70% {
        transform: rotate(5deg) translateY(-10px);
    }

    /* 引き上げ */
    100% {
        transform: rotate(12deg) translateY(20px) translateX(10px);
    }
}


/* ----------------------------------------
   底部ナビゲーション
   ---------------------------------------- */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 var(--spacing-lg);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.8);
}

.nav-item.active {
    color: var(--primary-light);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 12px;
    font-weight: 700;
}

/* ----------------------------------------
   釣りエリア
   ---------------------------------------- */
.fishing-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.idle-state,
.waiting-state,
.nibble-state,
.hit-state,
.result-state,
.gauge-battle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-lg);
}

.instruction,
.missed-text,
.gauge-instruction {
    font-size: 16px;
    font-family: var(--font-main);
    font-weight: bold;
    color: #efebe9;
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    padding: 10px 32px;
    border-radius: 50px;
    border: 3px solid #4e342e;
    margin-bottom: var(--spacing-lg);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.bobber-resting {
    font-size: 80px;
    animation: bobbing 3s ease-in-out infinite;
}

/* 水面とウキ */
.water-surface {
    position: relative;
    width: 200px;
    height: 200px;
    margin-top: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bobber {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ウキの棒（上部） */
.bobber-stick {
    width: 3px;
    height: 16px;
    background: #f97316;
}

/* ウキの本体（丸い赤） */
.bobber-body {
    width: 28px;
    height: 28px;
    background: #ef4444;
    border-radius: 50%;
    border-bottom: 3px solid white;
}

/* 待機中は静止（アニメーションなし） */

/* 揺れ（回数と間隔はインラインスタイルで動的に設定） */
.bobber.nibbling {
    animation-name: nibble-shake;
    animation-timing-function: ease-in-out;
    /* animation-duration と animation-iteration-count はインラインで設定 */
}

@keyframes nibble-shake {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(3px) rotate(-5deg);
    }

    75% {
        transform: translateY(3px) rotate(5deg);
    }
}

/* 沈み */
.bobber.sinking {
    animation: sink 0.4s ease-in forwards;
}

@keyframes sink {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(40px);
        opacity: 0.6;
    }
}

.ripple {
    position: absolute;
    margin-top: 30px;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ripple-expand 2s ease-out infinite;
}

.ripple.active {
    animation: ripple-expand 0.5s ease-out infinite;
}

@keyframes ripple-expand {
    0% {
        width: 40px;
        height: 40px;
        opacity: 1;
    }

    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

.splash {
    position: absolute;
    width: 100px;
    height: 50px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    animation: splash 0.3s ease-out;
}

@keyframes splash {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.wait-text,
.nibble-text {
    margin-top: var(--spacing-lg);
    font-size: 16px;
    color: var(--text-secondary);
}

.nibble-text {
    color: var(--accent-color);
    animation: blink 0.5s ease-in-out infinite;
}

.hit-text {
    margin-top: var(--spacing-lg);
    font-size: 24px;
    font-weight: 700;
    color: var(--danger-color);
}

.hit-text.flash {
    animation: flash 0.2s ease-in-out infinite;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ----------------------------------------
   ゲージバトル（インライン）
   ---------------------------------------- */
.gauge-battle {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg);
}

.gauge-battle-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-sm);
}

.gauge-battle-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--spacing-xl);
}

.fish-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
}

.fish-name {
    font-size: 28px;
    font-weight: 700;
}

.fish-power {
    font-size: 14px;
    color: var(--text-secondary);
}

/* レア度別の色 */
.rarity-D {
    color: var(--rarity-D);
}

.rarity-C {
    color: var(--rarity-C);
}

.rarity-B {
    color: var(--rarity-B);
}

.rarity-A {
    color: var(--rarity-A);
}

.rarity-S {
    color: var(--rarity-S);
}

/* 互換用 */
.rarity-common {
    color: var(--rarity-D);
}

.rarity-uncommon {
    color: var(--rarity-C);
}

.rarity-rare {
    color: var(--rarity-B);
}

.rarity-epic {
    color: var(--rarity-A);
}

.rarity-legendary {
    color: var(--rarity-S);
}

.gauge-container {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.gauge-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: transparent;
}

/* ゲージのゾーン */
.zone {
    position: absolute;
    top: 0;
    height: 100%;
}

.white-zone {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    left: 0;
}

.green-zone {
    background: rgba(74, 222, 128, 0.5);
    /* Light Green */
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.red-zone {
    background: rgba(239, 68, 68, 0.7);
    /* Red */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    z-index: 5;
}

.gauge-indicator {
    position: absolute;
    top: -5px;
    width: 4px;
    height: calc(100% + 10px);
    background: #fbbf24;
    box-shadow: 0 0 10px #fbbf24;
    border: 1px solid white;
    transform: translateX(-50%);
    z-index: 20;
    border-radius: 2px;
}

/* 成功ゾーン（緑） */
.success-zone {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #4ade80 50%, #22c55e 100%);
    opacity: 0.8;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

/* カーソル（縦棒） */
.cursor {
    position: absolute;
    top: -2px;
    width: 4px;
    height: calc(100% + 4px);
    background: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 1), 0 0 30px rgba(251, 191, 36, 0.5);
    border: 1px solid white;
    transform: translateX(-50%);
    transition: none !important;
    border-radius: 4px;
    z-index: 10;
}

.gauge-instruction {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

/* STOPボタン */
.btn-stop {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 24px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4);
    min-width: 200px;
}

.btn-stop:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.6);
}

.btn-stop:active {
    transform: scale(0.95);
}

/* ゲージバトル結果表示 */
.gauge-result {
    font-size: 48px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -2px;
}

.gauge-result.success {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
}

.gauge-result.failed {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
}

/* ----------------------------------------
   結果表示
   ---------------------------------------- */
.result-state {
    text-align: center;
}

.result-animation {
    font-size: 64px;
    margin-bottom: var(--spacing-md);
}

.result-state.success .result-animation {
    animation: success-bounce 0.5s ease-out;
}

@keyframes success-bounce {
    0% {
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.sparkles {
    position: absolute;
    font-size: 32px;
    animation: sparkle 1s ease-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.result-text {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
}

.result-details {
    font-size: 14px;
    color: var(--text-secondary);
}

.result-state.failed .result-animation {
    animation: fail-shake 0.5s ease-out;
}

@keyframes fail-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.result-state.missed .missed-text {
    font-size: 16px;
    font-family: 'Roboto Mono', monospace;
    color: #f472b6;
    /* Pink color */
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    padding: 8px 24px;
    border-radius: 20px;
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(4px);
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: none;
}

/* ----------------------------------------
   釣り画面フッター
   ---------------------------------------- */
.fishing-footer {
    padding: var(--spacing-md);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* ----------------------------------------
   ショップ画面
   ---------------------------------------- */
#shop-screen {
    background: var(--bg-dark);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.shop-title {
    font-size: 20px;
    font-weight: 600;
}

.shop-money {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--accent-color);
    font-weight: 600;
}

/* ----------------------------------------
   ショップタブ
   ---------------------------------------- */
.shop-tabs {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.shop-tab {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-tab:hover {
    color: var(--text-primary);
    background: rgba(14, 165, 233, 0.1);
}

.shop-tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-color);
}

/* ----------------------------------------
   ショップコンテンツ
   ---------------------------------------- */
.shop-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    /* スクロールバー非表示 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.upgrade-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.upgrade-section h3 {
    font-size: 16px;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-light);
}

.stars-display {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
}

.stars-display .star.filled {
    color: var(--accent-color);
}

.stars-display .star.empty {
    color: var(--text-secondary);
    opacity: 0.3;
}

.current-power,
.skill-slots,
.slot-info,
.bait-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.current-power strong,
.skill-slots strong,
.slot-info strong {
    color: var(--text-primary);
}

.hint {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ----------------------------------------
   ショップアイテム
   ---------------------------------------- */
.shop-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.shop-item:hover {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
}

.shop-item.equipped {
    border-color: var(--secondary-color);
    background: rgba(34, 197, 94, 0.1);
}

.shop-item.locked {
    opacity: 0.5;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.item-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.item-stats {
    font-size: 12px;
    color: var(--primary-light);
    margin-top: var(--spacing-xs);
}

.item-action {
    margin-left: var(--spacing-md);
}

/* 新しいスキルショップ用スタイル */
.item-action-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-left: var(--spacing-md);
}

.skill-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.skill-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

.equipped-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ショップボタン */
.btn {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-buy:hover:not(.disabled) {
    transform: scale(1.05);
}

.btn-equip {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-unequip {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* ガチャ結果用スタイル */
.gacha-card {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    /* スクロールバー非表示 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.gacha-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.gacha-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    position: relative;
    border: 2px solid transparent;
}

.gacha-result-item.rarity-S {
    border-color: var(--rarity-S);
    background: #fff7ed;
}

.gacha-result-item.rarity-B {
    border-color: var(--rarity-B);
    background: #eff6ff;
}

.gacha-result-item.rarity-D {
    border-color: var(--rarity-D);
}

.gacha-item-icon {
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--accent-color);
}

.gacha-item-info {
    text-align: center;
}

.gacha-item-name {
    font-size: 11px;
    font-weight: bold;
    color: #334155;
    margin-bottom: 2px;
}

.gacha-item-tier {
    font-size: 10px;
    color: #94a3b8;
}

.new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-3px);
    }
}

.btn-upgrade {
    background: linear-gradient(135deg, var(--accent-color) 0%, #d97706 100%);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.status {
    font-size: 12px;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.status.equipped {
    background: rgba(34, 197, 94, 0.2);
    color: var(--secondary-color);
}

.status.max {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-color);
}

/* ----------------------------------------
   ショップフッター
   ---------------------------------------- */
.shop-footer {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.shop-footer .btn-action,
.shop-footer .btn-nav {
    flex: 1;
}

/* ----------------------------------------
   トーストメッセージ
   ---------------------------------------- */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ----------------------------------------
   レスポンシブ対応
   ---------------------------------------- */
@media (max-width: 480px) {
    .title-text {
        font-size: 36px;
    }

    .title-sub {
        font-size: 16px;
        letter-spacing: 4px;
    }

    .btn-main {
        font-size: 18px;
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    .status-bar {
        flex-wrap: wrap;
    }

    /* Mobile Bait Name Adjustment */
    .bait-label-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        line-height: 1.1;
    }

    .bait-name-text {
        font-size: 9px !important;
        max-width: 60px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .bait-count-text {
        font-size: 9px !important;
    }

    .rod-display {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .gauge-battle {
        padding: var(--spacing-md);
    }

    .shop-tabs {
        font-size: 12px;
    }
}

/* ----------------------------------------
   キャストアニメーション
   ---------------------------------------- */
.cast-animation {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cast-animation .rod {
    font-size: 60px;
    animation: cast-swing 0.5s ease-out;
}

@keyframes cast-swing {
    0% {
        transform: rotate(-30deg);
    }

    50% {
        transform: rotate(30deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.line {
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, #fff 0%, transparent 100%);
}

.line.casting {
    animation: line-extend 0.5s ease-out forwards;
}

@keyframes line-extend {
    0% {
        height: 0;
    }

    100% {
        height: 100px;
    }
}

/* ========================================
   図鑑画面の追加スタイル
   ======================================== */
.encyclopedia-item {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-md);
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.encyclopedia-item .fish-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.encyclopedia-item .fish-icon .material-icons {
    font-size: 32px;
    color: var(--text-primary);
}

.fish-illustration {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.fish-info-col {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fish-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fish-info-col .fish-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
}

.fish-info-col .fish-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fish-description {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.special-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    border-radius: 12px;
    font-weight: bold;
}

.encyclopedia-item.unknown {
    opacity: 0.6;
}

.encyclopedia-item.unknown .fish-name {
    color: var(--text-secondary);
}

/* 称号付きアイテムの強調 */
.encyclopedia-item.special-entry {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.special-icon-bg {
    background: linear-gradient(135deg, #ffd700, #ffa500) !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.special-icon-bg .material-icons {
    color: #000 !important;
}

/* ----------------------------------------
   演出・アニメーション
   ---------------------------------------- */
.screen-shake {
    animation: screen-shake 0.3s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes screen-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* ========================================
   餌セレクター
   ======================================== */
.bait-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 4px;
}

.selector-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.selector-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.selector-btn:active {
    transform: scale(0.9);
}

.bait-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    cursor: pointer;
}

.bait-name {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
}

.bait-count {
    font-size: 14px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

/* ========================================
   購入ダイアログ
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    /* 木目調グラデーション */
    border: 4px solid #4e342e;
    /* 濃い茶色の枠 */
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 320px;
    text-align: center;
    color: #efebe9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
}

.modal-content::before {
    /* 装飾（リベット風） - 左上 */
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: #3e2723;
    border-radius: 50%;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-content::after {
    /* 装飾（リベット風） - 右上 */
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #3e2723;
    border-radius: 50%;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}


.modal-content h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: #ffd700;
    text-shadow: 2px 2px 0 #3e2723;
    letter-spacing: 1px;
}

.modal-content p {
    margin-bottom: 8px;
    color: #efebe9;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.purchase-options {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(62, 39, 35, 0.6);
    /* 暗い木目/紙 */
    border: 2px solid #5d4037;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.option:hover {
    background: rgba(93, 64, 55, 0.8);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.option .amount {
    font-weight: 800;
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.option .price {
    color: #ffd700;
    font-weight: 800;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.modal-actions {
    margin-top: 20px;
}

.btn-cancel {
    background: #5d4037;
    border: 2px solid #3e2723;
    color: #d7ccc8;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 0 #3e2723;
    transition: all 0.1s;
}

.btn-cancel:hover {
    background: #6d4c41;
    color: white;
    transform: translateY(-1px);
}

.btn-cancel:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ========================================
   ランク表示
   ======================================== */
.rank-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    line-height: 1;
}

.rank-label {
    font-size: 0.7rem;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.2em;
    margin-bottom: -4px;
}

.rank-char {
    font-size: 4rem;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    color: white;
    /* 3D効果を削除し、視認性を優先 */
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.2);
    transform: scale(1);
    animation: rankPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s backwards;
}

.rank-char.rarity-D {
    color: #94a3b8;
}

.rank-char.rarity-C {
    color: #22c55e;
}

.rank-char.rarity-B {
    color: #3b82f6;
}

.rank-char.rarity-A {
    color: #a855f7;
}

.rank-char.rarity-S {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    /* Sランクだけ少し光らせる */
}

@keyframes rankPop {
    from {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ========================================
   ショップタブ
   ======================================== */
.shop-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.shop-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-tab:hover {
    color: var(--text-primary);
}

.shop-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ========================================
   カジノタブ
   ======================================== */
.casino-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.casino-tab {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.casino-tab:hover {
    color: var(--text-primary);
}

.casino-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ========================================
   リサイクルガチャ（エコ・ボックス）
   ======================================== */
.recycle-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px dashed var(--border-color);
}

.recycle-header {
    margin-bottom: var(--spacing-md);
}

.recycle-header h3 {
    font-size: 16px;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.recycle-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.recycle-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.recycle-status {
    font-size: 13px;
    font-weight: bold;
}

.select-count {
    color: var(--text-secondary);
}

.select-count.complete {
    color: var(--success-color);
}

.recycle-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-mini {
    padding: 2px 8px;
    font-size: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
}

.btn-mini:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.recycle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--spacing-md);
    padding: 4px;
    /* スクロールバー用 */
    /* スクロールバー非表示 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.recycle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: all 0.2s;
}

.recycle-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.recycle-item.selected {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success-color);
}

.recycle-item.dimmed {
    opacity: 0.5;
    /* cursor: not-allowed; */
    /* 選択済みでもクリックで解除できるようにする場合はcursorは継続 */
}

.recycle-item.tier-1 {
    border-left: 3px solid #cd7f32;
}

.recycle-item.tier-2 {
    border-left: 3px solid #c0c0c0;
}

.recycle-item.tier-3 {
    border-left: 3px solid #ffd700;
}

.recycle-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.recycle-item.selected .recycle-item-icon {
    color: var(--success-color);
}

.recycle-item-info {
    flex: 1;
    overflow: hidden;
}

.recycle-item-info .name {
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recycle-item-info .tier {
    font-size: 9px;
    color: #94a3b8;
}

.recycle-item-info .count {
    font-size: 9px;
    color: var(--text-secondary);
}

.check-mark {
    position: absolute;
    top: 4px;
    right: 4px;
    color: var(--success-color);
    font-size: 16px;
}

.check-mark .material-icons {
    font-size: 16px;
}

.recycle-execute {
    display: flex;
    justify-content: center;
}

.btn-recycle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 32px;
    font-size: 16px;
    width: 100%;
}

.btn-recycle:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.no-skills {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12px;
}

/* ========================================
   フィーバー/太陽・月 アニメーション
   ======================================== */
.fever-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    /* 背景(0)より上、UIよりは下(適宜調整) */
    overflow: hidden;
    transition: background 1s ease;
}

/* 太陽モード背景 */
.fever-container.type-sun {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, rgba(56, 189, 248, 0) 100%);
}

.fever-container.type-sun.fever-active {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.3) 0%, rgba(249, 115, 22, 0.1) 100%);
}

/* 月モード背景 */
.fever-container.type-moon {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0) 100%);
}

.fever-container.type-moon.fever-active {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.celestial-body {
    position: absolute;
    bottom: -150px;
    /* 初期位置（画面外） */
    right: 30%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform-origin: center center;
}

.celestial-body .material-icons {
    font-size: 100px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.celestial-body.sun .material-icons {
    color: #fbbf24;
    /* Amber */
    text-shadow: 0 0 30px #f59e0b;
}

.celestial-body.moon .material-icons {
    color: #fcd34d;
    /* Amber Light */
    text-shadow: 0 0 30px #fbbf24;
}

/* レベルに応じた上昇（CSSセレクタのワイルドカード活用） */
/* 注意: class="fever-lv-X" を想定 */

/* 天体表示エリア (画面上部30%) */
.fever-sky-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    overflow: hidden;
    /* このエリア外にはみ出た部分は隠れる */
    pointer-events: none;
}

/* --- 太陽 (Sun) --- */

/* Lv0: 上空へ飛び去る */
.fever-container.type-sun[class~="fever-lv-0"] .sun {
    bottom: 150%;
    opacity: 0;
}

/* Lv1: Horizon下へリセット (透明) */
.fever-container.type-sun[class~="fever-lv-1"] .sun {
    bottom: -150px;
    opacity: 0;
    transition: none;
}

/* Lv2: 待機 */
.fever-container.type-sun[class~="fever-lv-2"] .sun {
    bottom: -150px;
    opacity: 0;
    transition: all 0.5s;
}

/* Lv3: ほんの少し頭出し (Horizon下からチラ見せ) */
.fever-container.type-sun[class~="fever-lv-3"] .sun {
    bottom: -80px;
    opacity: 1;
    transform: scale(0.5);
}

/* Lv4: 頭出し (Horizon上へ10px程度) */
.fever-container.type-sun[class~="fever-lv-4"] .sun {
    bottom: -70px;
    opacity: 1;
    transform: scale(0.6);
}

/* --- 月 (Moon) --- */

/* Lv0 */
.fever-container.type-moon[class~="fever-lv-0"] .moon {
    bottom: 150%;
    opacity: 0;
}

/* Lv1 */
.fever-container.type-moon[class~="fever-lv-1"] .moon {
    bottom: -150px;
    opacity: 0;
    transition: none;
}

/* Lv2 */
.fever-container.type-moon[class~="fever-lv-2"] .moon {
    bottom: -150px;
    opacity: 0;
    transition: all 0.5s;
}

/* Lv3 */
.fever-container.type-moon[class~="fever-lv-3"] .moon {
    bottom: -80px;
    opacity: 1;
    transform: scale(0.5);
}

/* Lv4 */
.fever-container.type-moon[class~="fever-lv-4"] .moon {
    bottom: -70px;
    opacity: 1;
    transform: scale(0.6);
}

/* Lv5: Horizonに半分 (bottom: -50px) */
/* ラッパーにより下半分はマスクされる */
.fever-container.type-sun[class~="fever-lv-5"] .sun,
.fever-container.type-moon[class~="fever-lv-5"] .moon {
    bottom: -50px;
    opacity: 1;
    transform: scale(0.7);
}

/* Lv6: 上昇開始 */
.fever-container.type-sun[class~="fever-lv-6"] .sun,
.fever-container.type-moon[class~="fever-lv-6"] .moon {
    bottom: 10%;
    opacity: 1;
    transform: scale(0.75);
}

/* Lv7 */
.fever-container.type-sun[class~="fever-lv-7"] .sun,
.fever-container.type-moon[class~="fever-lv-7"] .moon {
    bottom: 20%;
    opacity: 1;
    transform: scale(0.8);
}

/* Lv8 */
.fever-container.type-sun[class~="fever-lv-8"] .sun,
.fever-container.type-moon[class~="fever-lv-8"] .moon {
    bottom: 30%;
    opacity: 1;
    transform: scale(0.85);
}

/* Lv9 */
.fever-container.type-sun[class~="fever-lv-9"] .sun,
.fever-container.type-moon[class~="fever-lv-9"] .moon {
    bottom: 40%;
    opacity: 1;
    transform: scale(0.9);
}

/* Lv10 */
.fever-container.type-sun[class~="fever-lv-10"] .sun,
.fever-container.type-moon[class~="fever-lv-10"] .moon {
    bottom: 50%;
    opacity: 1;
    transform: scale(0.95);
}

/* Lv11 */
.fever-container.type-sun[class~="fever-lv-11"] .sun,
.fever-container.type-moon[class~="fever-lv-11"] .moon {
    bottom: 60%;
    opacity: 1;
    transform: scale(1.0);
}

/* Lv12: 頂点付近 (Sky Area上部80%) */
.fever-container.type-sun[class~="fever-lv-12"] .sun,
.fever-container.type-moon[class~="fever-lv-12"] .moon {
    bottom: 80%;
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px currentColor);
}

/* フィーバー発動中 (fever-active) */
.fever-container.fever-active .sun,
.fever-container.fever-active .moon {
    /* 位置固定を削除し、レベルごとの位置に従う */
    /* bottom: 60%; right: 50%; ... は削除 */

    /* 発光と脈動エフェクトを強化 */
    filter: drop-shadow(0 0 30px currentColor);
    animation: celestial-pulse 1s infinite alternate;
}

.fever-container.fever-active.type-sun .sun .material-icons {
    color: #ef4444;
    /* 真っ赤な太陽 */
    text-shadow: 0 0 50px #ef4444, 0 0 100px #f59e0b;
}

.fever-container.fever-active.type-moon .moon .material-icons {
    color: #fbbf24;
    /* 輝く月 */
    text-shadow: 0 0 50px #fbbf24, 0 0 100px #f59e0b;
}

@keyframes celestial-pulse {
    0% {
        transform: translateX(50%) scale(1.5);
        filter: drop-shadow(0 0 20px currentColor);
    }

    100% {
        transform: translateX(50%) scale(1.7);
        filter: drop-shadow(0 0 60px currentColor);
    }
}

/* ========================================
   宝箱リザルト表示
   ======================================== */
.loot-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    width: 100%;
}

.loot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.loot-item:nth-child(1) {
    animation-delay: 0.1s;
}

.loot-item:nth-child(2) {
    animation-delay: 0.2s;
}

.loot-item:nth-child(3) {
    animation-delay: 0.3s;
}

.loot-item.money {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.loot-item.item {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

.loot-item.skill {
    border-color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}

.loot-item.refund {
    border-color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

.loot-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

.loot-icon .material-icons {
    font-size: 20px;
}

.loot-item.money .loot-icon {
    color: #fbbf24;
}

.loot-item.item .loot-icon {
    color: #38bdf8;
}

.loot-item.skill .loot-icon {
    color: #a78bfa;
}

.loot-item.refund .loot-icon {
    color: #94a3b8;
}

.loot-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.loot-name {
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.loot-count {
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-color);
}

.result-card.treasure-result {
    max-width: 360px;
}

/* 宝箱リザルトはダークテーマにする (文字が白いため) */
.treasure-result .result-card {
    background: #1e293b;
    /* ダーク背景 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}


.chest-name {
    color: var(--primary-light);
    font-size: 1.2rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   イベント演出 (ボート・鳥)
   ======================================== */
.event-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    overflow: hidden;
}

/* ボート */
.event-boat {
    position: absolute;
    top: 25%;
    left: -150px;
    font-size: 60px;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3));
    animation: boatPass 20s linear forwards;
    z-index: 15;
}

@keyframes boatPass {
    0% {
        left: -150px;
        transform: scaleX(1);
    }

    100% {
        left: 120%;
        transform: scaleX(1);
    }
}

/* 鳥 */
.event-bird {
    position: absolute;
    top: 15%;
    right: -100px;
    font-size: 40px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: birdFly 12s linear forwards;
    z-index: 25;
}

@keyframes birdFly {
    0% {
        right: -100px;
        transform: translateY(0) scaleX(-1);
    }

    20% {
        transform: translateY(-30px) scaleX(-1);
    }

    40% {
        transform: translateY(0px) scaleX(-1);
    }

    60% {
        transform: translateY(20px) scaleX(-1);
    }

    80% {
        transform: translateY(-10px) scaleX(-1);
    }

    100% {
        right: 120%;
        transform: translateY(0) scaleX(-1);
    }
}

/* イベントメッセージ */
.event-message {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: eventMessageSlide 4s ease-in-out forwards;
    z-index: 100;
}

.event-message .material-icons {
    color: #fbbf24;
}

@keyframes eventMessageSlide {
    0% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    10% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    90% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

.game-boat {
    /* サイズ調整：お好みの大きさに */
    font-size: 120px !important;

    /* 色：真っ白を指定 */
    color: #ffffff;


    /* ポイント2：エッジを少し滑らかにする */
    -webkit-font-smoothing: antialiased;

    /* 配置設定 */
    display: inline-block;
    user-select: none;
    pointer-events: none;
    /* ゲームキャラとして扱わないならクリック判定を無効化してもOK */

    /* アニメーション：影がない分、動きで存在感を出す */
    animation: boat-floating 3.5s ease-in-out infinite;
}

/* 水面に浮いているような、ゆっくりとした上下と回転の動き */
@keyframes boat-floating {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-2deg);
    }

    75% {
        transform: translateY(5px) rotate(2deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* ----------------------------------------
   タウンメニュー（商店街）
   ---------------------------------------- */
.town-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 8px;
}

.shop-building {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #8d6e63 0%, #6d4c41 100%);
    /* 温かみのある木目グラデーション */
    border: 3px solid #4e342e;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 0 #3e2723, 0 8px 15px rgba(0, 0, 0, 0.4);
    /* 立体感のある影 */
}

.shop-building:hover {
    transform: translateY(-4px);
    border-color: #ffd700;
    /* ホバー時は金色に */
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    box-shadow: 0 8px 0 #3e2723, 0 12px 20px rgba(0, 0, 0, 0.5);
}

.shop-building:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #3e2723, 0 4px 6px rgba(0, 0, 0, 0.4);
}

.shop-building::after {
    content: 'ENTER';
    position: absolute;
    right: 20px;
    font-size: 10px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.3);
    /* 暗く彫り込んだような色 */
    letter-spacing: 2px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

.building-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.2);
    /* アイコン背景を暗く */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.building-icon .material-icons {
    font-size: 36px;
    color: #ffd700;
    /* 基本アイコンはゴールド */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.shop-building.rods .building-icon {
    color: #fbbf24;
}

.shop-building.skills .building-icon {
    color: #bfdbfe;
    /* 少し青み */
}

.shop-building.baits .building-icon {
    color: #86efac;
    /* 少し緑み */
}

.building-info {
    text-align: left;
}

.building-name {
    font-size: 18px;
    font-weight: 700;
    color: #efebe9;
    /* オフホワイト */
    margin-bottom: 4px;
    text-shadow: 1px 1px 0 #3e2723;
}

.building-desc {
    font-size: 12px;
    color: #d7ccc8;
    /* 薄いベージュ */
}


/* ----------------------------------------
   カジノ画面（娯楽街）スタイル
   ---------------------------------------- */
.casino-theme {
    background: radial-gradient(circle at center, #2e1065 0%, #0f172a 100%);
    position: relative;
}

.casino-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.casino-title {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
    font-weight: 900;
    letter-spacing: 2px;
}

/* カジノビル専用ボタン（町メニュー用） */
.shop-building.casino {
    border-color: #f43f5e;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, var(--bg-card) 100%);
}

.shop-building.casino .building-icon {
    color: #f43f5e;
    text-shadow: 0 0 10px #f43f5e;
}

/* ガチャマシンの見た目 */
.gacha-machine-card {
    background: #1e293b;
    border: 2px solid #fbbf24;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.machine-header {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.machine-display {
    background: #000;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid #334155;
    color: #fbbf24;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

/* リサイクルエリア（裏路地の交換所） */
.recycle-alley {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed #475569;
    padding: 15px;
    border-radius: var(--radius-md);
}

.recycle-alley h3 {
    color: #10b981;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

/* カジノフッター */
.casino-footer {
    background: linear-gradient(to top, #0f172a, #2e1065);
    border-top: 1px solid rgba(251, 191, 36, 0.3);
}


/* Header Back Button */
.btn-header-back {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-header-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-header-back .material-icons {
    font-size: 24px;
}

/* Money Popup Animation */
.money-popup {
    position: absolute;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    animation: moneyPopup 1.5s forwards;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    z-index: 100;
    right: 0;
    top: 100%;
}

@keyframes moneyPopup {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    20% {
        opacity: 1;
        transform: translateY(10px);
    }

    100% {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* ========================================
   Visual Clouds
   ======================================== */
.sky-clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    filter: blur(8px);
    animation: floatClouds linear infinite;
}

/* Cloud Shapes via pseudo-elements to make them fluffy */
.cloud::after,
.cloud::before {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud1 {
    width: 120px;
    height: 40px;
    top: 40px;
    left: -150px;
    animation-duration: 45s;
    opacity: 0.8;
}

.cloud1::after {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud1::before {
    width: 40px;
    height: 40px;
    top: -15px;
    left: 50px;
}

.cloud2 {
    width: 180px;
    height: 50px;
    top: 80px;
    left: -200px;
    animation-duration: 60s;
    animation-delay: -20s;
    opacity: 0.6;
    transform: scale(0.8);
}

.cloud2::after {
    width: 70px;
    height: 70px;
    top: -35px;
    left: 20px;
}

.cloud2::before {
    width: 60px;
    height: 60px;
    top: -20px;
    left: 80px;
}

.cloud3 {
    width: 100px;
    height: 30px;
    top: 20px;
    left: -120px;
    animation-duration: 35s;
    animation-delay: -10s;
    opacity: 0.5;
    transform: scale(0.6);
}

.cloud3::after {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 15px;
}

@keyframes floatClouds {
    0% {
        transform: translateX(-200px);
    }

    100% {
        transform: translateX(120vw);
    }
}

/* ----------------------------------------
   餌ステータス（下中央・大）
   ---------------------------------------- */
/* ----------------------------------------
   中央下部HUDコンテナ（統合版）
   ---------------------------------------- */
/* ----------------------------------------
   中央下部HUDコンテナ（温かみのある木目調）
   ---------------------------------------- */
.bottom-hud-center {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 28px;

    /* 木目風のデザイン */
    background: linear-gradient(135deg, #a1887f 0%, #8d6e63 100%);
    border: var(--border-style);
    border-radius: 50px;
    /* 角を丸くして柔らかく */
    box-shadow: var(--shadow-soft), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    z-index: 100;
}

/* 装飾用のリベット（鋲） */
.bottom-hud-center::before,
.bottom-hud-center::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4e342e;
    border-radius: 50%;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}

.bottom-hud-center::before {
    left: 15px;
}

.bottom-hud-center::after {
    right: 15px;
}

/* 町へボタン（浮き出たボタン感） */
.floating-btn {
    cursor: pointer;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-light);
    text-decoration: none;
    user-select: none;
}

.btn-town {
    background: linear-gradient(180deg, #ff7043 0%, #d84315 100%);
    border: 2px solid #bf360c;
    border-radius: 12px;
    width: 64px;
    height: 64px;
    box-shadow: 0 4px 0 #8d2b0b, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-town:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-town:active {
    transform: translateY(2px);
    box-shadow: 0 0px 0 #8d2b0b, 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-label {
    font-size: 10px;
    font-weight: bold;
    margin-top: 2px;
}

/* 餌ステータス（中央部分） */
.bait-status-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    min-width: 120px;
    border-left: 2px dashed rgba(255, 255, 255, 0.3);
    border-right: 2px dashed rgba(255, 255, 255, 0.3);
}

.bait-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 0px #4e342e;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.bait-value::before {
    font-size: 10px;
    color: var(--text-light);
    text-shadow: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

/* 竿バッジ（右側） */
.rod-badge {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 100px;
}

.rod-name {
    color: var(--text-light);
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.rod-stars {
    display: flex;
    gap: 2px;
}

.material-icons.star-filled {
    color: var(--accent-yellow);
    font-size: 16px;
}

.material-icons.star-empty {
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
}

/* 餌セレクターボタン（テーマに合わせて調整） */
.selector-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
    background: #5d4037;
    color: #efebe9;
    border: 1px solid #3e2723;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 0 #3e2723;
    transition: all 0.1s;
    padding: 0;
}

.selector-btn:hover {
    background: #8d6e63;
    transform: translateY(-1px);
}

.selector-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.bait-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Mobile Responsiveness (Added)
   ======================================== */

@media (max-width: 768px) {

    /* --- Base --- */
    :root {
        --spacing-md: 12px;
        --spacing-lg: 20px;
        --spacing-xl: 24px;
    }

    body {
        font-size: 14px;
    }

    /* --- Start Screen --- */
    .title-icon {
        font-size: 60px;
    }

    .title-text {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .title-sub {
        font-size: 18px;
        letter-spacing: 4px;
    }

    .btn-main {
        font-size: 18px;
        padding: var(--spacing-md) var(--spacing-lg);
    }

    /* --- Fishing Screen --- */
    .status-pill {
        min-width: auto;
        padding: 6px 12px;
        gap: 6px;
    }

    .status-value {
        font-size: 0.9rem;
    }

    .floating-status-left {
        left: 10px;
        top: calc(10px + env(safe-area-inset-top));
        transform: scale(0.75);
        transform-origin: top left;
    }

    .floating-status-right {
        right: 10px;
        top: calc(10px + env(safe-area-inset-top));
    }

    /* Bottom HUD - Compact Mode */
    .bottom-hud-center {
        bottom: 15px;
        width: 95%;
        padding: 10px 16px;
        gap: 10px;
        border-radius: 30px;
        justify-content: space-between;
    }

    /* Hide decorative rivets on mobile to prevent overlap */
    .bottom-hud-center::before,
    .bottom-hud-center::after {
        display: none;
    }

    .btn-town {
        width: 50px;
        height: 50px;
    }

    .btn-town .material-icons {
        font-size: 20px;
    }

    .btn-label {
        font-size: 9px;
    }

    .bait-status-large {
        padding: 0 10px;
        min-width: auto;
    }

    .bait-value {
        font-size: 16px;
    }

    .rod-badge {
        padding: 4px 8px;
        min-width: auto;
    }

    .rod-name {
        font-size: 11px;
    }

    .rod-stars .material-icons {
        font-size: 14px;
    }

    /* Shop/Casino */
    .shop-header {
        padding: 12px;
    }

    .shop-title {
        font-size: 1.2rem;
    }

    .town-menu {
        padding: 4px;
    }
}

/* 複数釣りバッジ */
.multi-catch-badge {
    position: absolute;
    top: 90px;
    right: -15px;
    background: linear-gradient(135deg, #ff4081, #c51162);
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    padding: 6px 14px;
    border-radius: 50px;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 20;
    transform: rotate(15deg);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(-30deg);
    }

    100% {
        transform: scale(1) rotate(15deg);
    }
}

/* ========================================
   ガチャ専用画面 (#gacha-screen)
   ======================================== */
#gacha-screen {
    background: #000;
    overflow: hidden;
    position: relative;
}

.gacha-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #000 100%);
    z-index: 1;
}

.gacha-light-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            rgba(255, 215, 0, 0.1) 20deg,
            transparent 40deg);
    transform: translate(-50%, -50%);
    animation: rotateRays 20s linear infinite;
    z-index: 2;
}

@keyframes rotateRays {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.gacha-stage {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.gacha-machine-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gacha-machine {
    width: 240px;
    height: 320px;
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    border: 8px solid #3e2723;
    border-radius: 40px 40px 20px 20px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.machine-glass {
    width: 180px;
    height: 160px;
    background: rgba(255, 255, 255, 0.1);
    border: 4px solid #3e2723;
    border-radius: 30px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.capsule-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.gacha-capsule {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.machine-body {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.machine-handle {
    width: 80px;
    height: 80px;
    background: #ffd700;
    border: 6px solid #b45309;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 0 #b45309;
    transition: transform 0.2s;
}

.machine-handle .material-icons {
    font-size: 40px;
    color: #451a03;
}

.machine-handle.spinning {
    animation: spinHandle 0.5s ease-in-out;
}

@keyframes spinHandle {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ガチャ結果表示 */
.gacha-result-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: var(--bg-card);
    border: 4px solid var(--accent-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 0 100px rgba(255, 215, 0, 0.3);
    z-index: 100;
    animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes resultPop {
    from {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.result-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 1);
}

.gacha-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
    /* スクロールバー非表示 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: 10px;
}

.gacha-result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

.gacha-result-card:hover {
    transform: scale(1.05);
}

.gacha-result-card.is-new::after {
    content: 'NEW!';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gacha-result-card .item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.gacha-result-card .item-name {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.gacha-result-card .owned-count {
    font-size: 0.75rem;
    color: #aaa;
}

.result-footer {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.gacha-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ========================================
   初心者ミッションUI
   ======================================== */
.mission-display {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    margin-top: 10px;
    max-width: 200px;
    box-shadow: var(--shadow-sm);
    animation: slideInLeft 0.5s ease-out;
    pointer-events: none;
    z-index: 100;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mission-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.mission-text {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    line-height: 1.4;
}

/* ヘルプボタン */
.btn-help {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

.btn-help:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ========================================
   動的ミッションUI
   ======================================== */
.mission-display.dynamic-mode {
    max-width: 280px;
    padding: 10px;
}

.dynamic-mission-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dynamic-mission-item:last-child {
    border-bottom: none;
}

.dynamic-mission-item .slot-label {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

.dynamic-mission-item .mission-desc {
    flex: 1;
    color: #fff;
}

.dynamic-mission-item .reward-icon {
    font-size: 14px;
}

/* チケット報酬時の特別スタイル */
.dynamic-mission-item.ticket-reward {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), transparent);
    border-radius: 4px;
    padding: 4px 6px;
}

.dynamic-mission-item.ticket-reward .slot-label {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #3e2723;
}

.dynamic-mission-item.ticket-reward .mission-desc {
    color: #ffd700;
    font-weight: bold;
}

/* Floating Status & Help Button */
.floating-status-right {
    position: absolute;
    top: calc(20px + env(safe-area-inset-top));
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    pointer-events: auto;
}

.btn-help {
    width: 48px;
    height: 48px;
    border-radius: 12px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-help .material-icons {
    font-size: 28px;
}

/* Mission List Styles */
.mission-item-row {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 6px;
    line-height: 1.4;
    text-align: left;
    width: 100%;
}

.mission-icon-small {
    font-size: 1.3rem;
    margin-right: 8px;
    color: #ffd700;
    flex-shrink: 0;
}

/* 報酬ポップアップ */
.reward-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.reward-popup-overlay.show {
    opacity: 1;
}

.reward-popup {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 2px solid #ffd700;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    min-width: 280px;
}

.reward-popup-overlay.show .reward-popup {
    transform: scale(1);
}

.reward-title {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.reward-icon-container {
    font-size: 4rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.reward-name {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.reward-close-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.reward-close-btn:hover {
    background: #1d4ed8;
}

/* ガチャボタンレイアウト */
.gacha-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

.gacha-button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.gacha-group-label {
    font-size: 0.85rem;
    color: #a0aec0;
    min-width: 80px;
}

.btn-ticket {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-ticket:hover:not(.disabled) {
    filter: brightness(1.1);
}

.btn-ticket.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.item-ticket-cost {
    color: #a78bfa;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ========================================
   霑ｽ蜉縺ｮ繝｢繝舌う繝ｫ繝ｬ繧ｹ繝昴Φ繧ｷ繝門ｯｾ蠢・   ======================================== */
@media (max-width: 768px) {

    /* 驥｣繧顔ｫｿ蜷阪・繝・く繧ｹ繝育怐逡･蟇ｾ蠢・*/
    .rod-badge {
        max-width: 80px !important;
        overflow: hidden !important;
    }

    .rod-name {
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 70px !important;
        display: block !important;
    }

    .rod-stars .material-icons {
        font-size: 12px !important;
    }

    .rod-stars {
        flex-wrap: nowrap !important;
    }

    /* 驥｣繧顔ｫｿ縺ｮ繝｢繝舌う繝ｫ菴咲ｽｮ隱ｿ謨ｴ */
    .fishing-rod-view {
        right: 5% !important;
        bottom: -80px !important;
        transform-origin: 95% 100% !important;
        transform: scale(0.65) !important;
    }

    .rod-shaft {
        height: 350px !important;
    }

    /* 驥｣繧顔ｫｿ繧｢繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ - 繝｢繝舌う繝ｫ逕ｨ縺ｫ隱ｿ謨ｴ */
    .fishing-rod-view.idle {
        /* castアニメ開始(45deg/100px)と揃えてワープを防止 */
        transform: scale(0.65) rotate(45deg) translateY(100px) !important;
    }

    .fishing-rod-view.waiting {
        /* castアニメ終了(-10deg/0)と揃えてワープを防止 */
        transform: scale(0.65) rotate(-10deg) translateY(0) !important;
    }

    .fishing-rod-view.nibble {
        /* waitingと角度を揃えてワープを防止 */
        transform: scale(0.65) rotate(-10deg) translateY(0) !important;
    }

    .fishing-rod-view.hit {
        transform: scale(0.65) rotate(-15deg) translateY(10px) !important;
    }

    .fishing-rod-view.strike {
        transform: scale(0.65) rotate(15deg) translateY(-5px) !important;
    }

    .fishing-rod-view.battle {
        transform: scale(0.65) rotate(-15deg) translateY(10px) !important;
    }

    .fishing-rod-view.casting {
        /* 0.8秒から0.5秒へ短縮（モバイル版） */
        animation: rodCastMobile 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
    }

    .fishing-rod-view.success {
        /* 0.8秒から0.5秒へ短縮（モバイル版） */
        animation: rodSuccessMobile 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
    }
}

@keyframes rodCastMobile {
    0% {
        transform: scale(0.65) rotate(45deg) translateY(100px);
    }

    30% {
        transform: scale(0.65) rotate(60deg) translateY(150px);
    }

    40% {
        transform: scale(0.65) rotate(60deg) translateY(150px);
    }

    100% {
        transform: scale(0.65) rotate(-10deg) translateY(0);
    }
}

@keyframes rodSuccessMobile {
    0% {
        transform: scale(0.65) rotate(-15deg) translateY(10px);
    }

    40% {
        transform: scale(0.65) rotate(-20deg) translateY(15px);
    }

    100% {
        transform: scale(0.65) rotate(10deg) translateY(20px) translateX(10px);
    }
}

/* ========================================
   ヘルプモーダルスタイル
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.help-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-primary);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--accent-yellow);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.btn-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.help-tabs {
    display: flex;
    gap: 0;
    padding: 0 var(--spacing-md);
    background: transparent;
    overflow-x: auto;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    /* スクロールバー非表示 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.help-tabs::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.help-tab {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    opacity: 0.7;
}

.help-tab.active {
    background: transparent;
    color: var(--accent-yellow);
    border-bottom: 3px solid var(--accent-yellow);
    opacity: 1;
}

.help-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.help-modal-content {
    background: linear-gradient(135deg, #3e2723 0%, #2d1b18 100%) !important;
    border: 3px solid #5d4037 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    /* 残りの高さを埋める */
    /* スクロールバー非表示 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.help-body::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.help-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.help-section.active {
    display: block;
}

.help-section h3 {
    font-size: 1.1rem;
    color: var(--ocean-surface);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

/* 釣りの手順 */
.help-step {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
}

.step-num {
    background: var(--accent-yellow);
    color: var(--bg-dark);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-text strong {
    display: block;
    color: var(--text-light);
    margin-bottom: 4px;
    font-size: 1rem;
}

.step-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.help-info-box {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

.help-info-box small {
    display: block;
    color: var(--ocean-surface);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* リストスタイル */
.help-list,
.help-simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.help-list .icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.help-list strong {
    display: block;
    color: var(--accent-yellow);
    margin-bottom: 2px;
}

.help-list p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.help-simple-list li {
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    padding-left: 8px;
    border-left: 3px solid var(--accent-yellow);
}

.help-simple-list strong {
    color: var(--text-light);
}

/* スキル定義リスト */
.skill-example dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 8px;
}

.skill-example dt {
    font-weight: bold;
    color: var(--rarity-B);
    grid-column: 1;
}

.skill-example dd {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    grid-column: 2;
}

.skill-example h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ========================================
   ブラッシュアップ用追加スタイル
   ======================================== */

.help-modal-content {
    background: linear-gradient(135deg, #3e2723 0%, #2d1b18 100%) !important;
    border: 3px solid #5d4037 !important;
    overflow: hidden;
}

/* ヒーローイメージ領域 */
.help-hero-image {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.help-hero-image .material-icons {
    font-size: 48px;
    color: var(--accent-yellow);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

/* ステップカード */
.help-step-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.help-step-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-step-card .step-num {
    background: var(--accent-yellow);
    color: #3e2723;
    font-weight: 900;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* グリッドレイアウト（施設案内用） */
.help-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grid-item {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
}

.grid-item .item-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-yellow);
}

.grid-item strong {
    color: var(--accent-yellow);
    display: block;
    font-size: 0.95rem;
}

.grid-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 特徴カード（フィーバーなど） */
.feature-card {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
    border-left: 3px solid var(--accent-yellow);
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
}

.feature-card h4 {
    margin: 0 0 4px 0;
    color: var(--accent-yellow);
    font-size: 1rem;
}

.feature-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 情報ボックスの強調 */
.help-info-box.gold {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* 所持スキル画面用スタイル */
.inventory-controls {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 12px;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    width: 100%;
    outline: none;
}

.filter-sort-row {
    display: flex;
    gap: 8px;
}

.filter-sort-row select {
    flex: 1;
    background: var(--bg-dark);
    color: white;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 4px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 4px;
}

.skill-inst-card {
    background: linear-gradient(135deg, #4e342e 0%, #3e2723 100%);
    border: 2px solid #5d4037;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

.skill-inst-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.skill-inst-card .tier-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 10px;
    color: var(--accent-color);
}

.skill-inst-card .material-icons {
    font-size: 32px;
    margin-bottom: 8px;
}

.skill-inst-card .name {
    font-size: 13px;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.skill-inst-card .desc {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.skill-inst-card.rarity-S {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.skill-inst-card.rarity-B {
    border-color: #c0c0c0;
}


/* スキル装備バッジ（カード内） */
.skill-inst-card.equipped {
    border-color: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.status-badge.equipped {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #4caf50;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* モーダルオーバーレイ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s;
}

/* スキル詳細モーダル */
.skill-detail-modal {
    background: #2d3748;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid #4a5568;
    position: relative;
    animation: slideUp 0.3s;
}

.skill-detail-modal.rarity-S {
    border-color: #ffd700;
    background: linear-gradient(135deg, #2d3748 0%, #3e2723 100%);
}

.skill-detail-modal.rarity-B {
    border-color: #c0c0c0;
}

.skill-detail-modal.rarity-D {
    border-color: #cd7f32;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.tier-badge-large {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--accent-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-body {
    text-align: center;
    margin-bottom: 24px;
}

.skill-icon-large .material-icons {
    font-size: 64px;
    color: var(--accent-color);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.skill-desc-large {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.skill-effect-detail {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    display: inline-block;
}

.effect-tag {
    color: #48bb78;
    font-weight: bold;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close-text {
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary {
    background: #4a5568;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #2d3748;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   Gacha Button (Cute Style)
   ======================================== */
.gacha-actions-grid .btn {
    border-radius: 50px !important;
    border: none !important;
    font-weight: 900 !important;
    letter-spacing: 1px;
    padding: 10px 5px !important;
    margin: 5px 0;
    transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.gacha-actions-grid .btn:active {
    transform: scale(0.95) translateY(2px) !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Ticket Button - Cute Pink */
.gacha-actions-grid .btn-ticket {
    background: linear-gradient(to bottom, #ff9a9e 0%, #ff6f91 100%) !important;
    box-shadow: 0 4px 0 #d64d6d, 0 5px 10px rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
}

/* Money Button - Cute Orange/Yellow */
.gacha-actions-grid .btn-buy {
    background: linear-gradient(to bottom, #ffd166 0%, #ff9f1c 100%) !important;
    box-shadow: 0 4px 0 #e08e0b, 0 5px 10px rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
}

/* Button Shine Effect */
.gacha-actions-grid .btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50px 50px 0 0;
    pointer-events: none;
}


/* ========================================
   合成工房 (Synthesis Shop) スタイル
   ======================================== */
.synthesis-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.synthesis-slots-area {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 15px;
}

.synthesis-slot-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slot-label {
    font-size: 0.8em;
    color: var(--text-secondary);
    font-weight: bold;
}

.synthesis-slot {
    width: 100%;
    aspect-ratio: 1;
    max-width: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
    text-align: center;
}

.synthesis-slot.empty:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.5);
}

.synthesis-slot.filled {
    border-style: solid;
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.slot-placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.slot-placeholder .material-icons {
    font-size: 40px;
    margin-bottom: 5px;
}

.synthesis-plus {
    color: var(--text-secondary);
}

.synthesis-arrow {
    text-align: center;
    color: #a855f7;
}

.synthesis-arrow .material-icons {
    font-size: 48px;
}

.synthesis-result-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.synthesis-result-slot {
    width: 80%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #a855f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.result-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9em;
}

.result-error {
    color: #ef4444;
    font-weight: bold;
}

.result-success {
    text-align: center;
}

.result-label {
    font-size: 0.7em;
    color: #fcd34d;
    font-weight: bold;
    letter-spacing: 2px;
}

.synthesis-actions {
    display: flex;
    gap: 12px;
}

.btn-synth-execute {
    flex: 2;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

.btn-synth-reset {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.synthesis-help-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.synthesis-help-box ul {
    margin: 0;
    padding-left: 20px;
}

.synthesis-help-box li {
    margin-bottom: 5px;
}

.highlight {
    color: #fcd34d;
    font-weight: bold;
}

/* スキル選択オーバーレイ */
.skill-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.selector-content {
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.selector-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selector-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-select-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.skill-select-card:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: #a855f7;
    transform: translateX(5px);
}

.skill-select-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.skill-select-card .name {
    font-weight: bold;
    color: var(--text-primary);
}

.skill-select-card .tier {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.skill-select-card .desc {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.skill-select-card.tier-4 {
    border-color: #f59e0b;
}

.skill-select-card.tier-4 .name {
    color: #f59e0b;
}

.selection-msg {
    margin-top: 5px;
    font-size: 0.85em;
    color: #ef4444;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.selection-msg::before {
    content: 'info';
    font-family: 'Material Icons';
    font-size: 1.2em;
}

/* ========================================
   通知バナー (Top Notification)
   ======================================== */
.notification-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(30, 41, 59, 0.95);
    border: 2px solid #fbbf24;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 90%;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    /* 下の操作を邪魔しない */
}

.notification-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-icon {
    font-size: 24px;
    color: #fbbf24;
}

.notification-content {
    display: flex;
    flex-direction: column;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
    color: #fbbf24;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 13px;
    color: #f1f5f9;
}

/* ========================================
   キャッチ結果の追加報酬表示
   ======================================== */
.extra-rewards-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.extra-rewards-title {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extra-rewards-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.extra-reward-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #fff;
}

.extra-reward-icon {
    font-size: 14px;
    color: #fbbf24;
}

/* ========================================
   Ticket Status Display (Gacha Shop)
   ======================================== */
.ticket-status-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-status-display .ticket-icon {
    color: #fbbf24;
    font-size: 24px;
}

.ticket-status-display .ticket-label {
    font-size: 16px;
    color: #e2e8f0;
}

.ticket-status-display .ticket-count {
    font-size: 20px;
    font-weight: bold;
    color: #fbbf24;
}

/* ========================================
   Debug Log Overlay
   ======================================== */
.debug-log-overlay {
    position: fixed;
    top: 60px; /* 右上のボタン類を避けるため少し下げる */
    right: 10px;
    width: 250px;
    height: 300px;
    background: rgba(15, 23, 42, 0.7); /* 少し投化 */
    border: 1px solid #38bdf8;
    border-radius: 8px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    font-family: 'Roboto Mono', monospace;
    pointer-events: auto;
}

.debug-log-header {
    background: #0f172a;
    color: #38bdf8;
    padding: 10px 15px;
    font-weight: bold;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom: 1px solid #38bdf8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debug-log-header .btn-close {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
}

.debug-log-content {
    padding: 10px;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 12px;
    line-height: 1.4;
    color: #e2e8f0;
    text-align: left;
}

.debug-log-content::-webkit-scrollbar {
    width: 8px;
}

.debug-log-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.debug-log-content::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 4px;
}

/* ========================================
   エリアレベルUI (Location Level)
   ======================================== */
.location-level-badge {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.location-level-badge:active {
    transform: scale(0.9);
    background: rgba(56, 189, 248, 0.4);
}

.location-level-badge.max {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}

/* ========================================
   釣り場移動 トランジション
   ======================================== */
.location-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a; /* 深い青 */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.location-transition-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.location-transition-overlay.fade-out {
    opacity: 0;
}

.transition-content {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.transition-icon {
    font-size: 64px;
    color: #38bdf8;
}

.transition-icon.moving {
    animation: boatBob 1.5s infinite ease-in-out;
}

.transition-content h2 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 2px;
    animation: pulseText 1.5s infinite;
}

@keyframes boatBob {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes pulseText {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ========================================
   釣り場テーマ 背景色設定
   ======================================== */
.theme-loc_river .ocean-bg, 
.theme-loc_river #fishing-screen {
    background: linear-gradient(to bottom, #7dd3fc 0%, #38bdf8 30%, #0284c7 100%);
}

.theme-loc_lake .ocean-bg, 
.theme-loc_lake #fishing-screen {
    background: linear-gradient(to bottom, #93c5fd 0%, #60a5fa 30%, #2563eb 100%);
}

.theme-loc_coast .ocean-bg, 
.theme-loc_coast #fishing-screen {
    background: linear-gradient(to bottom, #a7f3d0 0%, #34d399 30%, #059669 100%);
}

.theme-loc_offshore .ocean-bg, 
.theme-loc_offshore #fishing-screen {
    background: linear-gradient(to bottom, #dbeafe 0%, #3b82f6 30%, #1d4ed8 100%);
}

.theme-loc_deepsea .ocean-bg, 
.theme-loc_deepsea #fishing-screen {
    background: linear-gradient(to bottom, #1e3a8a 0%, #172554 30%, #020617 100%);
}