@font-face {
    font-family: 'PixelMplus12';
    src: url('../fonts/PixelMplus12-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PixelMplus12';
    src: url('../fonts/PixelMplus12-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #121820;
    --panel-bg: #1e2633;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-color: #e2e8f0;
    --border-color: #334155;
    --danger-color: #ef4444;
    --success-color: #10b981;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'DotGothic16', sans-serif;
    line-height: 1.6;
}

input,
select,
textarea,
button {
    font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'PixelMplus12', 'DotGothic16', sans-serif;
}

/* 英語版（lang="en"）専用タイポグラフィ（A案: 見出しPixelify Sans + 本文Inter） */
html[lang="en"] body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6,
html[lang="en"] .nav-link,
html[lang="en"] .header-lang-btn,
html[lang="en"] .turn-badge,
html[lang="en"] .btn,
html[lang="en"] .footer-logo a {
    font-family: 'Pixelify Sans', 'Inter', system-ui, sans-serif;
}

html[lang="en"] .footer-logo a {
    font-weight: 700;
    font-size: 1.45rem;
}

/* ユーティリティ */
.hidden {
    display: none !important;
}

.turn-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.turn-badge-sm {
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

header:not(.admin-header) {
    position: relative;
    background-color: var(--panel-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.header-lang-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.55);
    color: #f8fafc;
    font-family: 'PixelMplus12', 'DotGothic16', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.header-lang-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #fbbf24;
    color: #fef08a;
    transform: translateY(-1px);
    text-decoration: none;
}

header:not(.admin-header) h1 {
    padding: 0;
    margin: 0;
    line-height: 0;
    width: 100%;
}

header:not(.admin-header) h1 a {
    color: #f59e0b;
    text-decoration: none;
    display: block;
    width: 100%;
}

.header-title-img {
    display: block;
    width: 100%;
    max-width: 1000px;
    max-height: 589px;
    height: auto;
    margin: 0 auto;
    object-fit: cover;
    object-position: center top;
    image-rendering: pixelated;
}

header h1 a:hover {
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn-demo {
    background-color: #8b5cf6;
}

.btn-demo:hover {
    background-color: #7c3aed;
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #059669;
}

/* デジタル時計 & ターン進捗パネル */
.time-dashboard-bar {
    background-color: #0f172a;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.time-dashboard-clock-row,
.time-dashboard-turn-row {
    display: contents;
}

.time-dashboard-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.digital-clock-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #38bdf8;
    background-color: #1e293b;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #334155;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.turn-progress-box {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.turn-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
}

.turn-badge-desktop {
    display: inline;
}

.turn-badge-mobile {
    display: none;
}

.progress-subtext {
    color: #94a3b8;
    font-size: 0.8rem;
}

.turn-status-badge {
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: bold;
}

.progress-track-overlay {
    display: none;
}

.progress-track {
    background-color: #1e293b;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #334155;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #f59e0b);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.7;
        box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 18px rgba(245, 158, 11, 0.9);
    }

    100% {
        opacity: 0.7;
        box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
    }
}

main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 2.5rem 1.5rem 4.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-logo a {
    color: #f59e0b;
    text-decoration: none;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: 'Rampart One', 'RocknRoll One', 'Mochiy Pop One', cursive, sans-serif;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #f59e0b 0%, #fef08a 40%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(1px 2px 0px rgba(0, 0, 0, 0.9));
}

.footer-admin-link {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.6rem 1.2rem;
}

.footer-admin-link a,
.footer-admin-link a:link,
.footer-admin-link a:visited,
.footer-admin-link a:hover,
.footer-admin-link a:active,
.footer-admin-link a:focus {
    color: #f59e0b;
    text-decoration: none;
}

.footer-admin-link a:hover {
    text-decoration: underline;
}

/* 全画面ローディングモーダル */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: wait;
}

.loading-card {
    background-color: var(--panel-bg);
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
    max-width: 420px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

.loading-card h3 {
    color: #f3f4f6;
    font-size: 1.25rem;
}

.loading-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ターン進行レポート HTML モーダル */
.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.report-modal-card {
    background-color: var(--panel-bg);
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(139, 92, 246, 0.4);
    max-width: 580px;
    width: 92%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: modalFadeIn 0.25s ease-out;
}

.report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.report-modal-header h3 {
    color: #f59e0b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    transition: color 0.15s;
}

.btn-close-modal:hover {
    color: #f87171;
}

.report-modal-body {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-right: 0.4rem;
}

.report-news-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.15));
    border: 1px solid #8b5cf6;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-weight: bold;
    color: #f59e0b;
    font-size: 0.95rem;
    line-height: 1.4;
}

.report-event-item {
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background-color: #0f172a;
    border: 1px solid #1e293b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.report-event-item.event-negative {
    color: #f87171;
    border-left: 4px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

.report-event-item.event-support {
    color: #60a5fa;
    border-left: 4px solid #3b82f6;
    background-color: rgba(59, 130, 246, 0.08);
}

.report-event-item.event-neutral {
    color: #e2e8f0;
    border-left: 4px solid #64748b;
}

.island-name {
    font-weight: 800;
    color: #fbbf24;
}

.actor-island {
    color: #f59e0b;
}

.report-modal-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.btn-confirm-report {
    background-color: #8b5cf6;
    color: white;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}

.btn-confirm-report:hover {
    background-color: #7c3aed;
}

/* ==========================================================================
   トップページ（遠隔ニュース & ランキング）
   ========================================================================== */
.news-banner {
    background: linear-gradient(135deg, #3b0764, #1e1b4b);
    border: 2px solid #8b5cf6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.news-banner h2 {
    color: #f59e0b;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-list {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.news-empty {
    color: #94a3b8;
    font-size: 0.9rem;
}

.news-turn-section {
    margin-bottom: 0.85rem;
}

.news-turn-header {
    font-weight: 800;
    color: #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), transparent);
    border-left: 3px solid #f59e0b;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
    display: inline-block;
}

.news-turn-items {
    list-style: none;
    padding-left: 0.5rem;
}

.news-turn-items li {
    padding: 0.3rem 0;
    border-bottom: 1px dashed rgba(139, 92, 246, 0.25);
    font-size: 0.92rem;
    line-height: 1.45;
    color: #e2e8f0;
}

.section-header {
    margin-bottom: 1.25rem;
    color: #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.current-turn-badge {
    font-size: 0.85rem;
    font-weight: bold;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.ranking-table-wrapper {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ranking-table th {
    background-color: #0f172a;
    color: #94a3b8;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
}

.ranking-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.95rem;
}

.ranking-table tr:hover {
    background-color: rgba(59, 130, 246, 0.08);
}

.ranking-table tr.tr-ranking-empty:hover {
    background-color: transparent;
}

.ranking-empty {
    padding: 2.5rem 1rem !important;
    color: #94a3b8;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.th-rank {
    width: 50px;
    text-align: center;
}

.th-right,
.td-right {
    text-align: right;
}

.th-left,
.td-left {
    text-align: left;
}

.th-center,
.td-center {
    text-align: center;
}

.status-active-badge {
    color: #10b981;
    font-weight: bold;
    font-size: 0.85rem;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-protected {
    color: #eab308;
    background-color: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
}

.rank-1 {
    background-color: #f59e0b;
    color: #1e293b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.rank-2 {
    background-color: #94a3b8;
    color: #0f172a;
}

.rank-3 {
    background-color: #b45309;
    color: #fff;
}

.rank-other {
    background-color: #334155;
    color: #cbd5e1;
}

.island-link {
    color: #60a5fa;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.island-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.owner-tag {
    font-size: 0.8rem;
    color: #9ca3af;
    background-color: #111827;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.4rem;
}

/* 自分の島（開拓保護期間中）のランキング外付随表示スタイル */
.tr-my-protected-island {
    background: rgba(234, 179, 8, 0.06) !important;
    border-top: 2px dashed rgba(234, 179, 8, 0.6) !important;
}

.tr-my-protected-island:hover {
    background: rgba(234, 179, 8, 0.1) !important;
}

.rank-out-of-ranking {
    width: auto !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 9999px !important;
    font-size: 0.78rem !important;
    background: linear-gradient(135deg, #78350f 0%, #451a03 100%) !important;
    color: #fde68a !important;
    border: 1px solid #d97706 !important;
    box-shadow: 0 0 6px rgba(217, 119, 6, 0.3);
}

.badge-my-island {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    margin-left: 0.4rem;
    box-shadow: 0 0 6px rgba(124, 58, 237, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* ランキング表: ログイン中オーナー自身の島の行を強調 */
.tr-my-island {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.22) 0%, rgba(79, 70, 229, 0.06) 100%) !important;
    box-shadow: inset 0 0 0 2px #8b5cf6;
    scroll-margin-top: 90px;
}

.tr-my-island:hover {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.32) 0%, rgba(79, 70, 229, 0.12) 100%) !important;
}

.tr-my-island .island-link {
    font-weight: 700;
}

.badge-my-island-lead {
    margin-left: 0;
    margin-right: 0.4rem;
}

/* ランキング表の上: 自分の島の現在順位サマリー（クリックで該当行へ移動） */
.my-rank-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #8b5cf6;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.2) 0%, rgba(79, 70, 229, 0.06) 100%);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9rem;
}

.my-rank-summary:hover {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.3) 0%, rgba(79, 70, 229, 0.12) 100%);
}

.my-rank-summary-label {
    font-weight: 700;
    color: #c4b5fd;
}

.my-rank-summary-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.my-rank-summary-rank strong {
    font-size: 1.15rem;
    color: #fde68a;
}

.my-rank-summary-jump {
    margin-left: auto;
    font-size: 0.78rem;
    color: #a5b4fc;
}

.protection-countdown-text {
    font-size: 0.85rem;
    color: #fbbf24;
    margin-top: 0.35rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mobile-protection-hint {
    font-size: 0.78rem;
    color: #fbbf24;
    margin-top: 0.3rem;
    font-weight: 600;
}

.col-desktop {
    display: table-cell;
}

.col-mobile {
    display: none;
}

.mobile-stats-compact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
}

.mobile-stats-compact .stat-item {
    color: #cbd5e1;
    white-space: nowrap;
}

/* ==========================================================================
   島詳細ページ（マップ・コマンド予約・ログ）
   ========================================================================== */
.island-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.island-info h2 {
    color: #60a5fa;
}

.owner-subtext {
    font-size: 0.9rem;
    color: #9ca3af;
}

.res-list {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.res-item span {
    color: #f59e0b;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

.map-container {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    align-self: start;
}

.map-container h3 {
    text-align: left;
    margin-bottom: 0.75rem;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: #0f172a;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-left: auto;
}

.btn-zoom {
    background-color: var(--border-color);
    color: white;
    border: none;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-zoom:hover {
    background-color: var(--accent-color);
}

.btn-zoom-reset {
    background-color: #475569;
}

.zoom-badge {
    font-size: 0.8rem;
    color: #38bdf8;
    font-weight: bold;
    min-width: 45px;
    text-align: center;
}

.map-viewport {
    overflow: auto;
    touch-action: manipulation;
    position: relative;
    padding: 0.5rem;
    background-color: #0f172a;
    border-radius: 6px;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-12x12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    background-color: #0f172a;
    padding: 4px;
    border-radius: 4px;
    width: 100%;
    max-width: min(600px, 60vh);
    margin: 0 auto;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.map-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 2px;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: filter 0.15s, transform 0.1s;
}

.cell:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
    z-index: 10;
    outline: 2px solid #38bdf8;
}

/* ターゲット指定セルの赤枠強調（変更されるまで常時表示） */
.cell.cell-target-active {
    outline: 3px solid #ef4444 !important;
    outline-offset: -3px !important;
    box-shadow: inset 0 0 0 1px #7f1d1d, 0 0 8px rgba(239, 68, 68, 0.7) !important;
    z-index: 8 !important;
    position: relative;
}

.cell.cell-target-active:hover {
    outline: 3px solid #f87171 !important;
    outline-offset: -3px !important;
    box-shadow: inset 0 0 0 1px #991b1b, 0 0 10px rgba(239, 68, 68, 0.9) !important;
    z-index: 12 !important;
}

.cell-coord {
    font-size: 0.65rem;
    opacity: 0.8;
}

/* 地形カラー定義（ミニマップ等の単色表示・画像読込前のフォールバック色） */
.terrain-0 {
    background-color: #1e3a8a;
    color: #93c5fd;
}

/* 海 */
.terrain-1 {
    background-color: #0284c7;
    color: #e0f2fe;
}

/* 浅瀬 */
.terrain-10 {
    background-color: #78350f;
    color: #fde68a;
}

/* 荒地 */
.terrain-20 {
    background-color: #15803d;
    color: #bbf7d0;
}

/* 平地 */
.terrain-25 {
    background-color: #064e3b;
    color: #a7f3d0;
}

/* 森 (レーダー基地ダミー) */
.terrain-30 {
    background-color: #16a34a;
    color: #fef08a;
}

/* 農場 */
.terrain-40 {
    background-color: #4b5563;
    color: #f3f4f6;
}

/* 工場 */
.terrain-50 {
    background-color: #374151;
    color: #fbbf24;
}

/* 【廃止】旧・鉱山 */
.terrain-60 {
    background-color: #0284c7;
    color: #fef08a;
    font-weight: bold;
}

/* 【廃止】旧・観光地 */
.terrain-100 {
    background-color: #ca8a04;
    color: #ffffff;
}

/* 村 */
.terrain-101 {
    background-color: #ea580c;
    color: #ffffff;
}

/* 町 */
.terrain-102 {
    background-color: #dc2626;
    color: #ffffff;
    font-weight: bold;
}

/* 都市 */
.terrain-200 {
    background-color: #475569;
    color: #38bdf8;
}

/* 防衛施設 */
.terrain-210 {
    background-color: #7c2d12;
    color: #f87171;
}

/* ミサイル基地 */
.terrain-220 {
    background-color: #064e3b;
    color: #a7f3d0;
}

/* レーダー基地 (森と同じ色で偽装) */

/* ファミコン風ドット絵タイル（16×16px / tools/gen_tiles.py で生成）— メインマップのセルに適用 */
.cell[class*="terrain-"] {
    background-size: 100% 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 0;
}

.cell.terrain-0 {
    background-image: url("../img/tiles/terrain-0.png");
}

.cell.terrain-1 {
    background-image: url("../img/tiles/terrain-1.png");
}

.cell.terrain-10 {
    background-image: url("../img/tiles/terrain-10.png");
}

.cell.terrain-20 {
    background-image: url("../img/tiles/terrain-20.png");
}

.cell.terrain-25 {
    background-image: url("../img/tiles/terrain-25.png");
}

.cell.terrain-30 {
    background-image: url("../img/tiles/terrain-30.png");
}

.cell.terrain-40 {
    background-image: url("../img/tiles/terrain-40.png");
}

/* 農場・工場の規模違い（セル数値から lv-2 / lv-3 を付与。農場: 大=lv-2 / 工場: 中=lv-2, 大=lv-3） */
.cell.terrain-30.lv-2 {
    background-image: url("../img/tiles/terrain-30-2.png");
}

.cell.terrain-40.lv-2 {
    background-image: url("../img/tiles/terrain-40-2.png");
}

.cell.terrain-40.lv-3 {
    background-image: url("../img/tiles/terrain-40-3.png");
}

.cell.terrain-50 {
    background-image: url("../img/tiles/terrain-50.png");
}

.cell.terrain-60 {
    background-image: url("../img/tiles/terrain-60.png");
}

.cell.terrain-100 {
    background-image: url("../img/tiles/terrain-100.png");
}

.cell.terrain-101 {
    background-image: url("../img/tiles/terrain-101.png");
}

.cell.terrain-102 {
    background-image: url("../img/tiles/terrain-102.png");
}

.cell.terrain-200 {
    background-image: url("../img/tiles/terrain-200.png");
}

.cell.terrain-210 {
    background-image: url("../img/tiles/terrain-25.png");
}

.cell.terrain-220 {
    background-image: url("../img/tiles/terrain-220.png");
}

/* ミサイル基地: 他プレイヤーには森と同じ画像 */

/* 自分の島のミサイル基地のみ: 森タイルに terrain-210.png が薄く重なって表示され、青色の枠がつく */
.cell.terrain-210.is-my-missile-base {
    position: relative;
    box-shadow: inset 0 0 0 2px #38bdf8;
}

.cell.terrain-210.is-my-missile-base::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../img/tiles/terrain-210.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    opacity: 0.65;
    pointer-events: none;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 2px #38bdf8;
}

/* ドット絵を隠さないよう地形名ラベルは非表示（title・詳細モーダルで確認可能）、座標は縁取り付きで右下に小さく表示 */
.cell {
    position: relative;
}

.cell>span:not(.cell-coord):not(.cell-queue-count) {
    display: none;
}

.cell>.cell-coord {
    position: absolute;
    right: 1px;
    bottom: 0;
    font-size: 0.55rem;
    font-weight: normal;
    line-height: 1.1;
    color: #ffffff;
    opacity: 0.85;
    text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
    pointer-events: none;
}

/* 自島用: 予約コマンドが存在するセルの左上に予約数を表示するバッジ */
.cell>.cell-queue-count {
    position: absolute;
    top: 1px;
    left: 1px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 9999px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 5;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .cell>.cell-queue-count {
        min-width: 13px;
        height: 13px;
        padding: 0 2px;
        font-size: 0.5rem;
        top: 0;
        left: 0;
    }
}

.command-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.command-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #111827;
    padding: 1rem;
    border-radius: 6px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group.flex-1 {
    flex: 1;
}

.form-row-2col {
    display: flex;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: #9ca3af;
}

select,
input {
    background-color: #1f2937;
    color: #f3f4f6;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
}

.queue-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #1e293b;
    font-size: 0.9rem;
}

.queue-item:nth-child(even) {
    background-color: #111827;
}

.queue-empty {
    color: #9ca3af;
    justify-content: center;
}

.btn-add-command {
    margin-top: 0.5rem;
}

.btn-remove-queue {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
}

.btn-save-commands {
    background-color: #10b981;
}

.btn-save-commands:hover {
    background-color: #059669;
}

.log-panel {
    margin-top: 1.5rem;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.log-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.85rem;
}

.log-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #1e293b;
}

/* ==========================================================================
   レスポンシブ (スマホ対応)
   ========================================================================== */
@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .island-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 0.75rem 1rem;
    }

    .res-list {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .map-container {
        padding: 0.5rem;
    }

    .command-panel {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    header:not(.admin-header) {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    header:not(.admin-header) h1 {
        padding: 0;
    }

    .main-nav {
        width: 100%;
        max-width: 100%;
    }

    .main-nav .nav-link {
        padding: 0.65rem 0.2rem;
        font-size: 0.85rem;
    }

    .header-lang-btn {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.6rem;
        font-size: 0.78rem;
    }

    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-actions .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .time-dashboard-bar {
        display: contents;
    }

    .time-dashboard-clock-row {
        display: flex;
        justify-content: center;
        background-color: #0f172a;
        padding: 0.5rem 0.75rem 0.25rem;
    }

    .time-dashboard-turn-row {
        display: flex;
        flex-direction: column;
        background-color: #0f172a;
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0.75rem;
    }

    body.page-island-show {
        touch-action: pan-x pan-y;
    }

    body.page-island-show * {
        touch-action: manipulation;
    }

    body.page-island-show .time-dashboard-turn-row,
    body:has(.dashboard-layout) .time-dashboard-turn-row {
        position: sticky;
        top: 0;
        z-index: 500;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
        border-bottom: 1px solid rgba(56, 189, 248, 0.25);
    }

    .turn-badge-desktop {
        display: none !important;
    }

    .turn-badge-mobile {
        display: inline !important;
    }

    .turn-status-badge {
        display: none !important;
    }

    .progress-track {
        height: 18px;
    }

    .progress-track-overlay {
        position: absolute;
        inset: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem;
        font-weight: 700;
        color: #ffffff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
        pointer-events: none;
        z-index: 2;
        letter-spacing: 0.02em;
    }

    .turn-progress-box {
        min-width: 100%;
    }

    main {
        padding: 0.75rem 0.5rem;
    }

    footer {
        padding: 1.5rem 0.75rem 3rem;
    }

    .col-desktop {
        display: none !important;
    }

    .col-mobile {
        display: table-cell !important;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    .island-link {
        font-size: 0.95rem;
        display: block;
    }

    .owner-tag {
        display: inline-block;
        margin-left: 0;
        margin-top: 0.2rem;
        font-size: 0.75rem;
    }

    .news-banner {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   広域諸島海域マップ (Archipelago Map View)
   ========================================================================== */
.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-nav {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

.nav-link {
    flex: 1 1 0;
    color: #94a3b8;
    text-decoration: none;
    padding: 0.6rem 0.5rem;
    border-radius: 0;
    margin: 0;
    font-family: 'PixelMplus12', 'DotGothic16', sans-serif;
    font-weight: bold;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    white-space: nowrap;
}

.nav-link+.nav-link {
    border-left: none;
}

.nav-link:hover {
    color: #f3f4f6;
    background-color: #1e293b;
    z-index: 1;
}

.nav-link.active {
    color: #0f172a;
    background-color: #f59e0b;
    border-color: #d97706;
    z-index: 2;
}

.nav-link.nav-register-highlight {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.25) 100%);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.5);
}

.nav-link.nav-register-highlight:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.45) 100%);
    color: #fef08a;
}

/* ----------------------------------------------------
 * ミニマッププレビュー ポップアップ & プレビューグリッド
 * ---------------------------------------------------- */
.btn-minimap-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.2;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn-minimap-icon:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    transform: scale(1.08);
}

.minimap-popup {
    display: none;
    position: fixed;
    z-index: 10000;
    background: #0f172a;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.85), 0 0 25px rgba(59, 130, 246, 0.4);
    pointer-events: auto;
    width: 160px;
    box-sizing: border-box;
    transition: opacity 0.15s ease;
}

.minimap-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 4px;
}

.minimap-title-area {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    max-width: 110px;
}

.minimap-popup .tooltip-island-name {
    font-size: 0.8rem;
    color: #60a5fa;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.minimap-popup .tooltip-scale-tag {
    font-size: 0.65rem;
    color: #94a3b8;
    background: #1e293b;
    padding: 1px 4px;
    border-radius: 3px;
    flex-shrink: 0;
}

.btn-close-minimap {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.btn-close-minimap:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.mini-map-preview {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    width: 132px;
    height: 132px;
    background-color: #020617;
    padding: 3px;
    border-radius: 6px;
    border: 1px solid #334155;
    margin: 0 auto;
}

.mini-cell {
    aspect-ratio: 1;
    border-radius: 1px;
}

.minimap-popup .tooltip-loading {
    width: 132px;
    height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.78rem;
    margin: 0 auto;
}

.minimap-popup-footer {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.minimap-owner-info {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.btn-visit-island {
    display: block;
    text-align: center;
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.btn-visit-island:hover {
    background: #1d4ed8;
}

/* ----------------------------------------------------
 * セル選択詳細ポップアップ (モバイル対応) & 地形ハイライト
 * ---------------------------------------------------- */
.map-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-right: 0.25rem;
    font-weight: 600;
}

.btn-filter {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background-color: #334155;
    color: #f3f4f6;
}

.btn-filter.active {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #60a5fa;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.cell.filter-dim {
    opacity: 0.25;
    filter: grayscale(80%);
    transition: opacity 0.3s, filter 0.3s;
}

.cell.filter-highlight {
    opacity: 1;
    z-index: 5;
    box-shadow: 0 0 12px #f59e0b, inset 0 0 8px #f59e0b;
    border: 2px solid #fef08a !important;
    animation: highlightPulse 1.5s infinite alternate;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 6px #f59e0b;
    }

    100% {
        transform: scale(1.06);
        box-shadow: 0 0 16px #f59e0b;
    }
}

/* モバイル対応 セル詳細ポップアップモーダル */
.cell-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* スマホのアドレスバー分を除いた実表示領域に合わせる */
    box-sizing: border-box;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.cell-modal-overlay:not(.hidden) {
    display: flex;
}

.cell-modal-overlay.hidden {
    display: none !important;
}

.cell-modal-card {
    background: #1e293b;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.3);
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    /* 画面より背の高いモーダル（島の設定変更など）でも、ヘッダーの✕ボタンと
       本文末尾のターゲット確定ボタンに必ず届くよう、カードを画面内に収めて本文だけスクロールさせる */
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
}

.cell-modal-card>.cell-modal-header,
.cell-modal-card>.cell-modal-footer {
    flex-shrink: 0;
}

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

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

.cell-modal-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.cell-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cell-modal-icon {
    font-size: 2rem;
    background-color: #334155;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #475569;
}

.cell-modal-title h3 {
    color: #f3f4f6;
    font-size: 1.1rem;
    margin: 0;
}

.cell-modal-terrain-code {
    font-size: 0.75rem;
    font-weight: normal;
    color: #94a3b8;
    margin-left: 0.35rem;
}

.cell-modal-coord {
    font-size: 0.8rem;
    color: #38bdf8;
    font-weight: 600;
}

.btn-close-cell-modal {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s;
}

.btn-close-cell-modal:hover {
    color: #ef4444;
}

.cell-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.cell-modal-body>* {
    flex-shrink: 0;
}

.cell-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.cell-stat-item {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
}

.yield-food {
    color: #10b981;
}

.yield-money {
    color: #f59e0b;
}

.yield-pop {
    color: #38bdf8;
}

.cell-synergy-box {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.75rem;
}

.cell-synergy-box h4 {
    font-size: 0.85rem;
    color: #f59e0b;
    margin-bottom: 0.35rem;
}

.synergy-text {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* セル詳細ダイアログ内の予約コマンド一覧 */
.cell-queue-box {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.75rem;
}

.cell-queue-box h4 {
    font-size: 0.85rem;
    color: #38bdf8;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cell-queue-badge-count {
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.cell-queue-badge-count.is-empty {
    background: #334155;
    color: #94a3b8;
}

.cell-queue-badge-count.is-active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.cell-queue-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 140px;
    overflow-y: auto;
}

.cell-queue-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    color: #f1f5f9;
}

.cell-queue-item .queue-idx {
    font-weight: 700;
    color: #f59e0b;
    font-size: 0.75rem;
    min-width: 24px;
}

.cell-queue-item .queue-cmd-badge {
    background: #0f172a;
    color: #38bdf8;
    border: 1px solid #0284c7;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.cell-queue-item .queue-coord {
    color: #94a3b8;
    font-size: 0.75rem;
}

.cell-queue-empty {
    font-size: 0.8rem;
    color: #64748b;
    padding: 0.2rem 0;
}

.cell-modal-footer {
    padding: 1rem 1.25rem;
    background-color: #0f172a;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.btn-target-cell {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    width: 100%;
    padding: 0.65rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
    transition: transform 0.15s;
}

.btn-target-cell:active {
    transform: scale(0.98);
}

/* ----------------------------------------------------
 * ログ・ニュースの検索とフィルタリング (3.3)
 * ---------------------------------------------------- */
.log-panel-header,
.news-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.log-counter {
    font-size: 0.8rem;
    color: #38bdf8;
    background-color: #0f172a;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    border: 1px solid #334155;
}

.log-filter-toolbar {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.btn-load-more-logs {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.55rem 0.8rem;
    background-color: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-load-more-logs:hover:not(:disabled) {
    background-color: #273449;
    color: #f1f5f9;
}

.btn-load-more-logs:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-load-more-logs.hidden {
    display: none;
}

.log-visibility-note {
    margin: -0.5rem 0 0.75rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.search-group {
    flex: 1;
    min-width: 260px;
    justify-content: flex-end;
}

.input-log-search {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    flex: 1;
    max-width: 240px;
}

.input-log-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.select-log-turn {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.btn-log-cat,
.btn-news-cat {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-log-cat:hover,
.btn-news-cat:hover {
    background-color: #334155;
    color: #f3f4f6;
}

.btn-log-cat.active,
.btn-news-cat.active {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #60a5fa;
    font-weight: bold;
}

/* カテゴリタグ・バッジ */
.log-cat-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 0.4rem;
    display: inline-block;
    white-space: nowrap;
}

.log-cat-dev {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.log-cat-military {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.log-cat-support {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.log-cat-other {
    background-color: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.log-turn-tag {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: bold;
    margin-right: 0.4rem;
}

.log-item,
.news-item {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    transition: background-color 0.15s;
}

.news-island-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

a.news-island-link:hover {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.3);
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.log-island-link {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.15s ease, background-color 0.15s ease;
    border-radius: 2px;
    padding: 0 2px;
}

.log-island-link:hover {
    color: #7dd3fc;
    background-color: rgba(56, 189, 248, 0.15);
    text-decoration: underline;
}

.log-item:hover,
.news-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.log-item.hidden,
.news-item.hidden,
.news-turn-section.hidden {
    display: none !important;
}

/* ----------------------------------------------------
 * コマンド予約キューの操作性向上 (3.1)
 * ---------------------------------------------------- */
.queue-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger-sm {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-danger-sm:hover {
    background-color: #dc2626;
}

.template-toolbar {
    display: none !important;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.template-select-box {
    display: flex;
    gap: 0.35rem;
    flex: 1;
    min-width: 200px;
}

.select-template {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    flex: 1;
}

.btn-template-action {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-template-action:hover {
    background-color: #2563eb;
}

.btn-save-preset {
    background-color: #10b981;
}

.btn-save-preset:hover {
    background-color: #059669;
}

/* キューリスト ＆ ドラッグ＆ドロップ */
.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #1e293b;
    font-size: 0.85rem;
    user-select: none;
    transition: background-color 0.15s, opacity 0.15s;
    background-color: #1e293b;
}

.queue-item:nth-child(even) {
    background-color: #17202e;
}

.queue-item.dragging {
    opacity: 0.4;
    background-color: #3b82f6 !important;
    border: 1px dashed #60a5fa;
}

.queue-drag-handle {
    cursor: grab;
    color: #64748b;
    font-size: 1rem;
    padding: 0 0.3rem;
}

.queue-drag-handle:active {
    cursor: grabbing;
}

.queue-item-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    overflow: hidden;
}

.queue-idx {
    font-weight: bold;
    color: #f59e0b;
    font-size: 0.8rem;
    min-width: 24px;
}

.queue-cmd-badge {
    color: #38bdf8;
    font-weight: bold;
    flex-shrink: 0;
}

.queue-target-island {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-coord {
    color: #94a3b8;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.queue-item-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.btn-queue-icon {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    border-radius: 4px;
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-queue-icon:hover {
    background: #334155;
    color: white;
}

.btn-queue-icon.btn-remove {
    color: #f87171;
}

.btn-queue-icon.btn-remove:hover {
    background: #ef4444;
    color: white;
}

/* 複製ボタン（CSSで非表示） */
.btn-queue-icon.btn-duplicate,
.btn-queue-icon[title="複製"] {
    display: none !important;
}

/* ==========================================================================
   オン/オフ トグルスイッチ & ステータスバッジ（災害トグル等で共用）
   ========================================================================== */
/* スライダースイッチ本体 */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    cursor: pointer;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #cbd5e1;
    transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.switch-toggle input:checked+.slider-round {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.switch-toggle input:checked+.slider-round:before {
    transform: translateX(18px);
    background-color: #ffffff;
}

/* ステータスバッジ */
.status-active-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-paused-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.mini-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .disaster-toggle-container {
        padding: 0.25rem 0.5rem;
        gap: 0.4rem;
    }

    .disaster-toggle-title {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   災害 (Disaster) オン/オフ トグルスイッチ & ステータスバッジ
   ========================================================================== */
.disaster-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(30, 20, 25, 0.75);
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    user-select: none;
}

.disaster-toggle-container:hover {
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.disaster-toggle-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fecaca;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.switch-toggle input:checked+.slider-round.disaster-slider {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.disaster-status-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

.disaster-status-badge.status-active {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.5);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.disaster-status-badge.status-paused {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 4px rgba(148, 163, 184, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* 管理者: 地震発生ボタンスタイル */
.island-admin-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.btn-earthquake-trigger {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: #fef2f2;
    border: 1px solid #ef4444;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-earthquake-trigger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

.btn-earthquake-trigger:active {
    transform: translateY(0);
}

/* 地震マップシェイクアニメーション */
@keyframes mapEarthquakeShake {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    10% {
        transform: translate(-5px, -3px) rotate(-0.5deg);
    }

    20% {
        transform: translate(5px, 4px) rotate(0.5deg);
    }

    30% {
        transform: translate(-4px, 3px) rotate(-0.3deg);
    }

    40% {
        transform: translate(4px, -3px) rotate(0.4deg);
    }

    50% {
        transform: translate(-3px, 2px) rotate(-0.2deg);
    }

    60% {
        transform: translate(3px, -2px) rotate(0.2deg);
    }

    70% {
        transform: translate(-2px, 1px) rotate(-0.1deg);
    }

    80% {
        transform: translate(2px, -1px) rotate(0.1deg);
    }

    90% {
        transform: translate(-1px, 0) rotate(0deg);
    }

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

.map-shake {
    animation: mapEarthquakeShake 0.7s cubic-bezier(.36, .07, .19, .97) both;
}

/* ========================================== */
/* ナビゲーション アクションボタン */
/* ========================================== */
.nav-action-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.btn-register-island {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-register-island:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
    transform: translateY(-1px);
}

.btn-banned-words {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #f1f5f9;
    border: 1px solid #64748b;
}

.btn-banned-words:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ========================================== */
/* カスタムモーダル UI */
/* ========================================== */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-modal-overlay.is-active {
    display: flex;
    opacity: 1;
}

.custom-modal-dialog {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: modalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #334155;
    background: #0f172a;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close-trigger {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.3rem;
    transition: color 0.15s ease;
}

.modal-close-trigger:hover {
    color: #f8fafc;
}

.custom-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.modal-hint-text {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 1.2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #334155;
}

.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #334155;
    background: #0f172a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* フォーム部品 */
.form-group-custom {
    margin-bottom: 1rem;
}

.form-group-custom label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.badge-req {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-left: 0.3rem;
    font-weight: normal;
}

.form-control-custom {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    background: #0f172a;
    border: 1px solid #475569;
    border-radius: 6px;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-custom:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.field-help {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.3rem;
}

.form-inline-custom {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-inline-custom input {
    flex: 1;
}

/* アラート表示 */
.custom-alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #6ee7b7;
}

/* 禁止ワード一覧タグUI */
.banned-words-section {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
}

.banned-words-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.banned-words-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #f8fafc;
}

.btn-text-link {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.15s;
}

.btn-text-link:hover {
    color: #7dd3fc;
}

.banned-words-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.25rem;
}

.banned-word-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 20px;
    padding: 0.25rem 0.65rem;
    font-size: 0.82rem;
    color: #fca5a5;
    transition: background 0.15s;
}

.banned-word-tag:hover {
    background: #334155;
}

.btn-remove-tag {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.15rem;
    border-radius: 50%;
    transition: all 0.15s;
}

.btn-remove-tag:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

/* ========================================== */
/* 特別ユーザー区分「キャスト」 ピンクテーマ */
/* ========================================== */

/* キャストバッジ */
.badge-cast {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
    margin-left: 0.35rem;
    vertical-align: middle;
    letter-spacing: 0.02em;
    border: 1px solid #f472b6;
    animation: castGlowPulse 2.5s infinite ease-in-out;
}

@keyframes castGlowPulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
    }

    50% {
        box-shadow: 0 0 16px rgba(244, 114, 182, 0.8), 0 0 6px rgba(251, 207, 232, 0.6);
    }
}

.mini-cast-badge {
    font-size: 0.68rem;
    padding: 0.1rem 0.4rem;
}

/* ランキングテーブル（一覧画面）でのキャスト島強調 */
.tr-cast-island {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.14) 0%, rgba(244, 114, 182, 0.04) 100%) !important;
    border-left: 4px solid #ec4899 !important;
    position: relative;
}

.tr-cast-island:hover {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.22) 0%, rgba(244, 114, 182, 0.08) 100%) !important;
}

.tr-cast-island .island-link {
    color: #f472b6 !important;
    font-weight: 700;
}

.tr-cast-island .island-link:hover {
    color: #fbcfe8 !important;
    text-shadow: 0 0 8px rgba(244, 114, 182, 0.6);
}

/* 諸島全体海域マップ（Archipelago）でのキャスト島強調 */
.sector-cast-island {
    border: 2px solid #ec4899 !important;
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.55), inset 0 0 12px rgba(236, 72, 153, 0.2) !important;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.16) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
}

.sector-cast-island:hover {
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.75), inset 0 0 16px rgba(236, 72, 153, 0.3) !important;
    border-color: #f472b6 !important;
}

.badge-cast-coord {
    background: rgba(236, 72, 153, 0.3) !important;
    border-color: #ec4899 !important;
    color: #fbcfe8 !important;
}

/* 島詳細画面ヘッダーでのキャスト強調 */
.cast-island-header {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(30, 41, 59, 0.95) 100%) !important;
    border-left: 6px solid #ec4899 !important;
    box-shadow: 0 4px 20px -2px rgba(236, 72, 153, 0.35) !important;
}

.cast-island-header h2 {
    color: #fbcfe8 !important;
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.owner-tag-cast {
    background: rgba(236, 72, 153, 0.2) !important;
    border: 1px solid #f472b6 !important;
    color: #fbcfe8 !important;
}

/* 管理者キャスト切替ボタン */
.btn-cast-toggle {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: #ffffff;
    border: 1px solid #f472b6;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-cast-toggle:hover {
    background: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
    transform: translateY(-1px);
}

.btn-cast-toggle:active {
    transform: translateY(0);
}

/* ----------------------------------------------------
 * 🏝️ 新規ユーザー登録・島開拓画面 (Register Page)
 * ---------------------------------------------------- */
.nav-register-highlight {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.6) !important;
    color: #38bdf8 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    transition: all 0.2s ease;
}

.nav-register-highlight:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.45) 0%, rgba(99, 102, 241, 0.45) 100%) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
    transform: translateY(-1px);
}

.register-page-container {
    max-width: 920px;
    margin: 2rem auto 4rem auto;
    padding: 0 1rem;
    animation: fadeIn 0.4s ease-out;
}

.register-hero-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.register-hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.register-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.register-hero-lead {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

/* 開拓者特典グリッド */
.perks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.perk-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.perk-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}

.perk-icon {
    font-size: 2rem;
    line-height: 1;
}

.perk-info h4 {
    margin: 0 0 0.35rem 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.perk-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.45;
}

/* 登録フォームカード */
.register-form-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    margin-bottom: 2rem;
}

.register-form-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}

.register-form-header h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f8fafc;
}

.register-form-header p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.label-with-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.char-count {
    font-size: 0.75rem;
    color: #64748b;
    font-family: monospace;
}

.form-row-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .form-row-two-col {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.form-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .form-actions-bar {
        flex-direction: column-reverse;
        width: 100%;
    }

    .form-actions-bar .btn {
        width: 100%;
        text-align: center;
    }
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
}

.btn-glow {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
    border: 1px solid rgba(56, 189, 248, 0.4);
    transition: all 0.25s ease;
}

.btn-glow:hover {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.55);
    transform: translateY(-1px);
}

/* 心得カード */
.rules-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.5rem;
}

.rules-card h4 {
    margin: 0 0 0.85rem 0;
    font-size: 0.95rem;
    color: #cbd5e1;
}

.rules-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.7;
}

.rules-card strong {
    color: #e2e8f0;
}

/* ========================================== */
/* 🛠️ 管理者コンソール (Admin Console) UI */
/* ========================================== */
.admin-body {
    background: radial-gradient(circle at 15% 15%, #0f172a 0%, #020617 100%);
    color: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem 1.5rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-brand h1 {
    font-size: 1.25rem;
    margin: 0;
    padding: 0;
}

.admin-brand h1 a {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 700;
}

.admin-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-header-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-secondary-subtle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary-subtle:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.btn-warning-subtle {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fcd34d;
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-warning-subtle:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

.btn-danger-subtle {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-danger-subtle:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

.admin-main {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.admin-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 1.5rem 4rem;
    margin-top: auto;
    font-size: 0.85rem;
    background: rgba(2, 6, 23, 0.7);
}

/* 🔐 ログイン画面 */
.admin-login-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.login-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.login-subtext {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.admin-login-form {
    text-align: left;
}

.login-actions {
    margin-top: 1.5rem;
}

.login-footer-links {
    margin-top: 1.5rem;
    text-align: center;
}

.login-footer-links .back-link {
    color: #38bdf8;
    font-size: 0.85rem;
    text-decoration: none;
}

.login-footer-links .back-link:hover {
    text-decoration: underline;
}

/* 📊 統計メトリクスカード */
.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, border-color 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
}

.metric-icon {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.6rem;
    border-radius: 10px;
    line-height: 1;
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0.2rem 0;
}

.metric-sub {
    font-size: 0.75rem;
    color: #64748b;
}

/* 🎛️ ダッシュボードグリッド */
.admin-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .admin-grid-layout {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    background: rgba(30, 41, 59, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-card-header {
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #f1f5f9;
}

.admin-card-body {
    padding: 1.25rem;
}

.admin-help-text {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ⚙️ 設定アイテム一覧 */
.admin-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 70%;
}

.setting-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.setting-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.setting-toggle {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

/* ⚠️ 危険ゾーン */
.danger-zone-box {
    background: rgba(239, 68, 68, 0.06);
    border: 1px dashed rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    padding: 1.15rem;
}

.danger-zone-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f87171;
    margin-bottom: 0.35rem;
}

.danger-zone-desc {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

/* 🚫 禁止ワード管理 */
.banned-words-add-form {
    display: flex;
    gap: 0.5rem;
}

.banned-words-add-form input {
    flex: 1;
}

.banned-words-list-header h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.banned-words-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-remove-word {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.15rem;
    border-radius: 50%;
    transition: all 0.15s;
}

.btn-remove-word:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

/* 📋 管理用諸島テーブル */
.admin-table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    background: rgba(15, 23, 42, 0.6);
    color: #94a3b8;
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}


.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* ==========================================================================
   📢 更新情報ページ (Updates / Changelog) UI
   ========================================================================== */
main:has(.updates-page-container) {
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
}

@media (max-width: 768px) {
    main:has(.updates-page-container) {
        padding: 0.75rem 0.4rem 1.25rem;
    }
}

.updates-page-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0;
}

.updates-hero {
    padding: 4px 0 12px 0;
    text-align: center;
}

.updates-hero-title {
    font-size: 22px;
    color: #f59e0b;
    margin: 0 0 6px 0;
    font-weight: 800;
}

.updates-hero-desc {
    color: #94a3b8;
    font-size: 13.5px;
    line-height: 1.5;
    max-width: 720px;
    margin: 0 auto;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.updates-card {
    background: var(--panel-bg, #1e2633);
    border: 1px solid var(--border-color, #334155);
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.updates-card.is-latest {
    border: 2px solid #38bdf8;
}

.updates-card.is-featured {
    border: 2px solid #10b981;
    border-left: 6px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(6, 78, 59, 0.3) 35%, rgba(30, 38, 51, 0.98) 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3), 0 0 14px rgba(16, 185, 129, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.updates-card.is-featured:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.42), 0 0 20px rgba(16, 185, 129, 0.25);
}

.updates-card.is-featured-gold {
    border: 2px solid #f59e0b;
    border-left: 6px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(120, 53, 15, 0.3) 35%, rgba(30, 38, 51, 0.98) 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35), 0 0 14px rgba(245, 158, 11, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.updates-card.is-featured-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.48), 0 0 20px rgba(245, 158, 11, 0.3);
}

.updates-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

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

.updates-version-badge {
    background: #334155;
    color: #e2e8f0;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 13px;
    font-family: monospace;
}

.updates-version-badge.is-latest {
    background: #38bdf8;
    color: #0f172a;
}

.updates-tag-badge {
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.updates-new-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 10px;
}

.updates-featured-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.updates-featured-badge.badge-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.updates-card.is-featured .updates-headline {
    color: #6ee7b7;
    font-weight: 800;
    font-size: 16.5px;
}

.updates-card.is-featured-gold .updates-headline {
    color: #fde68a;
    font-weight: 800;
    font-size: 16.5px;
}

.updates-card.is-featured .updates-version-badge {
    background: rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.updates-card.is-featured-gold .updates-version-badge {
    background: rgba(245, 158, 11, 0.25);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.updates-card.is-featured .updates-item {
    border-left: 3px solid #10b981;
    background: rgba(6, 78, 59, 0.22);
}

.updates-card.is-featured-gold .updates-item {
    border-left: 3px solid #f59e0b;
    background: rgba(120, 53, 15, 0.2);
}

/* TOPページ用 重要更新情報セクション */
.top-featured-updates {
    margin-bottom: 22px;
    padding: 14px 18px 12px 18px;
}

.top-featured-updates-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
}

.top-featured-updates-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #6ee7b7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-featured-updates-title a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.15s ease;
}

.top-featured-updates-title a:hover {
    color: #a7f3d0;
}

a.updates-featured-badge {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

a.updates-featured-badge:hover {
    filter: brightness(1.15);
    transform: scale(1.04);
}

.top-featured-updates-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-featured-updates-item {
    display: flex;
    align-items: center;
    font-size: 13.5px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.top-featured-updates-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
    flex: 1;
    transition: color 0.15s ease;
}

.top-featured-updates-link:hover .top-featured-updates-headline {
    color: #38bdf8;
    text-decoration: underline;
}

.top-featured-updates-date {
    font-family: monospace;
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}

.top-featured-updates-headline {
    color: #f1f5f9;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
    transition: color 0.15s ease;
}

.top-featured-updates-headline:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.top-featured-updates-more {
    text-align: right;
    margin-top: 8px;
    padding-top: 4px;
}

.top-featured-updates-more a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

.top-featured-updates-more a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.updates-headline {
    margin: 0;
    font-size: 15.5px;
    color: #f8fafc;
}

.updates-date {
    color: #94a3b8;
    font-size: 12px;
    font-family: monospace;
}

.updates-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.updates-item {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid #1e293b;
    border-left: 3px solid #38bdf8;
    border-radius: 5px;
    padding: 8px 12px;
}

.updates-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.updates-item-badge {
    background: rgba(255, 255, 255, 0.08);
    font-size: 10.5px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

.updates-item-title {
    color: #f1f5f9;
    font-size: 14px;
}

.updates-item-desc {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

.updates-footer-action {
    text-align: center;
    margin-top: 18px;
}

.updates-btn-back {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13.5px;
}

/* ==========================================================================
   📖 公式ルール説明書 (Rules) UI
   ========================================================================== */
.rules-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.rules-hero {
    background: var(--panel-bg, #1e2633);
    border: 2px solid var(--border-color, #334155);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rules-hero-tag {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.rules-hero-title {
    font-size: 26px;
    color: #f59e0b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rules-hero-desc {
    color: #94a3b8;
    font-size: 14.5px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.rules-toc {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color, #334155);
    border-radius: 8px;
    padding: 16px 22px;
    margin-bottom: 22px;
}

.rules-toc-title {
    color: #e2e8f0;
    margin-bottom: 12px;
    font-size: 16px;
}

.rules-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    font-size: 14px;
}

.rules-toc-link {
    color: #38bdf8;
    text-decoration: none;
}

.rules-toc-link:hover {
    text-decoration: underline;
}

.rules-section {
    background: var(--panel-bg, #1e2633);
    border: 1px solid var(--border-color, #334155);
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 20px;
}

.rules-section-title {
    color: #f59e0b;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
    margin-bottom: 16px;
    font-size: 19px;
}

.rules-section p {
    line-height: 1.7;
    margin-bottom: 12px;
}

.rules-section ul,
.rules-section ol {
    margin-left: 20px;
    line-height: 1.8;
}

.rules-highlight-box {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.rules-warning-box {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.rules-danger-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.rules-info-box {
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid #38bdf8;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.rules-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    margin-top: 14px;
    margin-bottom: 16px;
}

.rules-table th,
.rules-table td {
    border: 1px solid #334155;
    padding: 8px 12px;
    font-size: 13.5px;
    line-height: 1.45;
}

.rules-table th {
    background: #0f172a;
    color: #38bdf8;
    font-weight: bold;
    text-align: center;
}

.rules-table td {
    background: rgba(15, 23, 42, 0.4);
}

.rules-table .col-nowrap {
    white-space: nowrap;
}

.rules-table .col-cost {
    white-space: nowrap;
    text-align: right;
}

/* 第5章: 施設・地形テーブルの列幅最適化 */
.rules-facility-table {
    min-width: 740px;
}

.rules-facility-table th:nth-child(1),
.rules-facility-table td:nth-child(1) {
    white-space: nowrap;
    width: 18%;
}

.rules-facility-table th:nth-child(2),
.rules-facility-table td:nth-child(2) {
    white-space: nowrap;
    width: 20%;
}

.rules-facility-table th:nth-child(3),
.rules-facility-table td:nth-child(3) {
    white-space: nowrap;
    width: 22%;
}

.rules-facility-table th:nth-child(4),
.rules-facility-table td:nth-child(4) {
    width: 40%;
}

/* 第6章: ミサイル兵器テーブルの列幅最適化 */
.rules-missile-table {
    min-width: 680px;
}

.rules-missile-table th:nth-child(1),
.rules-missile-table td:nth-child(1) {
    white-space: nowrap;
    width: 20%;
}

.rules-missile-table th:nth-child(2),
.rules-missile-table td:nth-child(2) {
    white-space: nowrap;
    width: 18%;
}

.rules-missile-table th:nth-child(3),
.rules-missile-table td:nth-child(3) {
    width: 38%;
}

.rules-missile-table th:nth-child(4),
.rules-missile-table td:nth-child(4) {
    white-space: nowrap;
    width: 24%;
}

.rules-table tr:hover td {
    background: rgba(30, 41, 59, 0.6);
}

.rules-table td.code {
    font-family: monospace;
    text-align: center;
}

.rules-table tr.bg-blue-light {
    background: rgba(59, 130, 246, 0.05);
}

.rules-table tr.bg-blue-mid {
    background: rgba(59, 130, 246, 0.08);
}

.rules-table tr.bg-blue-strong {
    background: rgba(59, 130, 246, 0.12);
}

.rules-table tr.bg-red-light {
    background: rgba(239, 68, 68, 0.05);
}

.rules-table-container {
    overflow-x: auto;
    margin-bottom: 16px;
}

.rules-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.rules-resource-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
}

.rules-resource-card h4 {
    margin-bottom: 6px;
}

.rules-resource-card p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

.rules-step-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.rules-step-item {
    background: #0f172a;
    border-left: 4px solid #3b82f6;
    padding: 14px;
    border-radius: 0 8px 8px 0;
}

.rules-step-item.step-green {
    border-left-color: #10b981;
}

.rules-step-item.step-amber {
    border-left-color: #f59e0b;
}

.rules-step-item.step-purple {
    border-left-color: #a855f7;
}

.rules-step-item.step-pink {
    border-left-color: #ec4899;
}

.rules-step-item.step-cyan {
    border-left-color: #38bdf8;
}

.rules-step-title {
    margin-bottom: 4px;
}

.rules-step-desc {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.6;
}

.rules-step-desc-sm {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.6;
}

.rules-step-desc span.warn {
    color: #fbbf24;
}

.rules-btn-lg {
    padding: 12px 28px;
    font-size: 16px;
}

.rules-btn-lg.btn-slate {
    background: #475569;
}

.rules-btn-lg.mr-2,
.rules-btn-mr {
    margin-right: 12px;
}

.text-red {
    color: #f87171;
}

.text-mint {
    color: #34d399;
}

.text-purple {
    color: #c084fc;
}

.text-pink {
    color: #f472b6;
}

.rules-footer-btn-wrap {
    text-align: center;
    margin-top: 24px;
}

/* ==========================================================================
   🏝️ トップ・島詳細・共通コンポーネント (Index, Show & Common)
   ========================================================================== */
.my-rank-summary-protected {
    border-color: #38bdf8;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15) 0%, rgba(30, 41, 59, 0.4) 100%);
}

.my-rank-summary-protected .my-rank-summary-label {
    color: #38bdf8;
}

.my-rank-summary-protected .my-rank-summary-rank {
    color: #cbd5e1;
    font-size: 0.85rem;
}

.ranking-note {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0.25rem;
}

.ranking-note.has-summary {
    margin-top: -0.25rem;
}

.island-id-tag {
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.island-id-badge-wrap {
    margin-left: 8px;
    font-size: 13px;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.island-id-val {
    font-family: monospace;
    letter-spacing: 1px;
    color: #1e293b;
}

.btn-copy-id-sm {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 11px;
    padding: 1px 6px;
    cursor: pointer;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
}

.btn-action-settings {
    margin-left: 10px;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.btn-action-redeem {
    margin-left: 6px;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #eab308;
    background: rgba(234, 179, 8, 0.1);
    color: #fde047;
}

.admin-badge-amber {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #f59e0b;
    color: #f59e0b;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-howto-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn-open-howto-styled {
    font-size: 0.9rem;
    font-weight: bold;
    padding: 6px 20px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    transition: all 0.2s ease;
}

.btn-open-howto-styled:hover {
    background: rgba(56, 189, 248, 0.28);
    border-color: #7dd3fc;
    color: #e0f2fe;
}

.btn-coin-styled {
    font-size: 0.9rem;
    font-weight: bold;
    padding: 6px 20px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #f59e0b;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-coin-styled:hover {
    background: rgba(245, 158, 11, 0.28);
    border-color: #fbbf24;
    color: #fef08a;
    transform: translateY(-1px);
}

.farm-shortage-alert {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid #f59e0b;
    color: #fde68a;
    padding: 8px 14px;
    border-radius: 8px;
    margin: 0 auto 1rem auto;
    font-size: 0.85rem;
    width: fit-content;
    max-width: 95%;
    text-align: center;
}

.readonly-mode-banner {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #d97706;
    font-size: 13px;
}

.readonly-mode-banner a {
    color: #2563eb;
    font-weight: bold;
}

/* 攻撃対象島セル選択ミニマップピッカー（自島ページ） */
.target-picker-panel {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
}

.target-picker-header {
    margin-bottom: 0.5rem;
}

.target-picker-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #38bdf8;
}

.target-picker-protected {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

.target-picker-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 3px;
    background-color: #020617;
    border: 1px solid #334155;
    border-radius: 6px;
}

.target-picker-cell {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border-radius: 1px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.target-picker-cell:hover {
    transform: scale(1.12);
    z-index: 2;
    box-shadow: 0 0 0 1px #ffffff;
}

.target-picker-cell.is-selected {
    box-shadow: 0 0 0 2px #ef4444, 0 0 8px rgba(239, 68, 68, 0.9);
    z-index: 3;
}

.target-picker-loading {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 2.5rem 0;
}

.target-picker-footer {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
}

.target-picker-coord-label {
    color: #f8fafc;
    font-weight: 700;
}

.target-picker-island-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
}

.target-picker-island-link:hover {
    text-decoration: underline;
}

/* 他島ページからのミサイル発射予約パネル */
.remote-missile-panel {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    padding: 0.9rem;
    margin-bottom: 1rem;
}

.remote-missile-title {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    color: #fca5a5;
}

.remote-missile-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.remote-missile-protected {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 6px;
    padding: 0.65rem 0.8rem;
    font-size: 0.84rem;
    color: #fbbf24;
}

.remote-missile-requirement {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.btn-remote-missile {
    background-color: #dc2626;
}

.btn-remote-missile:hover {
    background-color: #b91c1c;
}

.remote-missile-status {
    margin-top: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.remote-missile-status.is-success {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.remote-missile-status.is-success a {
    color: #38bdf8;
    font-weight: 700;
    margin-left: 0.35rem;
}

.remote-missile-status.is-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

/* セル詳細ポップアップ内のコマンド予約ボックス */
.cell-modal-command-box {
    margin-top: 0.9rem;
    padding: 0.85rem;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid #334155;
    border-radius: 8px;
}

.cell-modal-command-box h4 {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    color: #38bdf8;
}

.cell-modal-sea-notice {
    font-size: 0.84rem;
    color: #94a3b8;
    padding: 0.35rem 0;
}

.cell-modal-command-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cell-modal-select {
    width: 100%;
    padding: 0.55rem 0.65rem;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 6px;
    color: #f8fafc;
    font-size: 0.9rem;
}

.queue-auto-save-status {
    font-size: 0.78rem;
    font-weight: bold;
    color: #4ade80;
}

.queue-food-warning-box {
    display: none;
    padding: 8px 14px;
    border-radius: 6px;
    margin: 10px auto;
    font-size: 0.82rem;
    line-height: 1.45;
    width: fit-content;
    max-width: 92%;
    text-align: center;
}

/* モーダル共通スタイル */
.modal-z-howtoplay {
    z-index: 2000;
}

.modal-z-dialog {
    z-index: 20000;
}

.how-to-play-card {
    max-width: 480px;
    width: 92%;
}

.how-to-play-title {
    margin: 0;
}

.how-to-play-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.how-to-play-step {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 14px;
}

.how-to-play-step.step-1 {
    border-left: 4px solid #38bdf8;
}

.how-to-play-step.step-2 {
    border-left: 4px solid #4ade80;
}

.how-to-play-step.step-3 {
    border-left: 4px solid #fbbf24;
}

.how-to-play-step.step-4 {
    border-left: 4px solid #f87171;
}

.how-to-play-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.how-to-play-badge {
    color: #0f172a;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.how-to-play-badge.step-1 {
    background: #38bdf8;
}

.how-to-play-badge.step-2 {
    background: #4ade80;
}

.how-to-play-badge.step-3 {
    background: #fbbf24;
}

.how-to-play-badge.step-4 {
    background: #f87171;
}

.how-to-play-step-title {
    font-weight: bold;
    color: #f8fafc;
    font-size: 1rem;
}

.how-to-play-step-desc {
    margin-top: 6px;
    padding-left: 34px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.ui-dialog-card {
    max-width: 440px;
    width: 92%;
}

.ui-dialog-title {
    margin: 0;
    font-size: 1.05rem;
}

.ui-dialog-body {
    padding: 1.2rem 1.25rem;
}

.ui-dialog-message {
    white-space: pre-line;
    line-height: 1.65;
    color: #e2e8f0;
    font-size: 0.92rem;
}

.ui-dialog-input-wrap {
    display: none;
    margin-top: 12px;
}

.ui-dialog-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 6px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    font-size: 0.95rem;
}

.ui-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #334155;
}

.ui-dialog-btn-cancel {
    display: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
}

.ui-dialog-btn-ok {
    background: #2563eb;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.footer-copyright {
    margin: 6px 0 10px 0;
    font-size: 0.8rem;
    line-height: 1.5;
}

.footer-copyright a {
    color: #94a3b8;
}

/* ==========================================================================
   🔑 ログイン・登録 (Auth & Register) UI
   ========================================================================== */
.login-form-card {
    max-width: 500px;
    margin: 0 auto;
}

.custom-alert-list {
    margin: 6px 0 0 16px;
    padding: 0;
}

.form-actions-full {
    margin-top: 24px;
}

.btn-block {
    width: 100%;
}

.auth-switch-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-switch-link a {
    color: var(--primary, #3b82f6);
    font-weight: bold;
}

.form-check-cast {
    background: rgba(236, 72, 153, 0.12);
    border: 1px dashed #ec4899;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.form-check-cast label {
    color: #f472b6;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-weight: bold;
    font-size: 1rem;
}

.form-check-cast input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ec4899;
    cursor: pointer;
}

.form-check-cast .field-help {
    color: #fbcfe8;
    margin-top: 0.4rem;
}

/* ==========================================================================
   🛠️ 管理者コンソール (Admin UI) 補足
   ========================================================================== */
.admin-role-badge-header {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-right: 8px;
}

.admin-disaster-desc {
    margin-top: 6px;
}

.admin-disaster-result {
    margin-top: 10px;
}

.admin-island-id-text {
    font-size: 11px;
    font-family: monospace;
    color: #475569;
    letter-spacing: 0.5px;
}

.admin-audit-option-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.admin-audit-option-input {
    width: 16px;
    height: 16px;
}

.admin-audit-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.admin-audit-result-box {
    display: none;
    margin-top: 16px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid #334155;
    font-size: 13px;
    color: #e2e8f0;
}

.admin-danger-zone-disabled {
    border: 1px dashed #64748b;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0.75;
}

.admin-danger-zone-title-muted {
    color: #94a3b8;
}

.btn-disabled-muted {
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

/* ==========================================================================
   🏝️ 島詳細・共通コンポーネント 拡張スタイル (Show Page Extensions)
   ========================================================================== */
.alert-flex {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-flex.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #86efac;
}

.alert-flex.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.food-balance-text {
    margin-left: 4px;
    font-weight: bold;
}

.text-amber {
    color: #fbbf24;
}

.text-green {
    color: #4ade80;
}

.text-primary-blue {
    color: #60a5fa;
}

.text-cyan {
    color: #38bdf8;
}

.text-light {
    color: #f8fafc;
}

.ml-1 {
    margin-left: 4px;
}

.modal-card-sm {
    max-width: 480px;
}

.modal-body-padded {
    padding: 1.25rem;
}

.modal-info-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

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

.modal-info-row-between.mb-1 {
    margin-bottom: 4px;
}

.modal-info-row-between.mb-2 {
    margin-bottom: 6px;
}

.modal-info-help {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 6px;
    border-top: 1px dashed #334155;
    padding-top: 4px;
    line-height: 1.4;
}

.modal-form-group {
    margin-bottom: 1.2rem;
}

.modal-form-group.mb-md {
    margin-bottom: 1rem;
}

.modal-form-group.mb-lg {
    margin-bottom: 1.5rem;
}

.modal-form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.modal-form-label .label-sub {
    font-weight: normal;
    font-size: 0.75rem;
    color: #94a3b8;
}

.modal-form-label .label-req {
    color: #ef4444;
    font-size: 0.8rem;
}

.modal-form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 6px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    font-size: 0.95rem;
}

.modal-form-input.input-serial {
    color: #fde047;
    font-size: 1.1rem;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.modal-field-hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

.modal-field-hint.hint-serial {
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.4;
}

.modal-hr {
    border: 0;
    border-top: 1px solid #334155;
    margin: 1.2rem 0;
}

.modal-actions-right {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1rem;
}

.modal-actions-right.mt-lg {
    margin-top: 1.5rem;
}

.btn-save-settings {
    background: #2563eb;
    color: #ffffff;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 6px;
}

.btn-submit-serial {
    background: #eab308;
    color: #1e293b;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 6px;
}

.btn-copy-id-dark {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.settings-feedback-box {
    display: none;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

.settings-feedback-box.feedback-success {
    display: block;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #4ade80;
}

.settings-feedback-box.feedback-error {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

.d-inline {
    display: inline;
}

.audit-msg-success {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid #10b981;
    color: #6ee7b7;
    font-weight: bold;
}

.audit-msg-warning {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid #f59e0b;
    color: #fcd34d;
    font-weight: bold;
}

.admin-table-sm {
    font-size: 12px;
}

.diff-highlight {
    color: #fbbf24;
    font-weight: bold;
}

.audit-discrepancy-wrap {
    margin-top: 8px;
}

.audit-discrepancy-list {
    margin: 6px 0 0 18px;
    max-height: 240px;
    overflow-y: auto;
    line-height: 1.6;
}

/* ==========================================================================
   レボコイン購入ページ (Coin Page)
   ========================================================================== */
.coin-page-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 12px 40px;
}

.coin-hero {
    text-align: center;
    margin-bottom: 24px;
}

.coin-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.03em;
}

.coin-hero-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.coin-island-id-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.coin-island-id-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coin-island-id-label {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 600;
}

.coin-island-id-value-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.coin-island-id-badge {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #fef08a;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    padding: 4px 14px;
    border-radius: 6px;
}

.coin-island-id-name {
    color: #94a3b8;
    font-size: 0.9rem;
}

.coin-island-id-note {
    font-size: 0.82rem;
    color: #fbbf24;
    line-height: 1.5;
    margin-top: 4px;
}

.btn-copy-id {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #fef08a;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-copy-id:hover {
    background: rgba(245, 158, 11, 0.35);
    border-color: #fbbf24;
    color: #ffffff;
}

.coin-island-id-guest {
    background: rgba(30, 41, 59, 0.7);
    border: 1px dashed #475569;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 28px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.coin-island-id-guest a {
    color: #38bdf8;
    text-decoration: underline;
    font-weight: 700;
}

/* 3商品紹介グリッド */
.coin-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 860px) {
    .coin-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.coin-product-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.coin-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(245, 158, 11, 0.6);
}

.coin-product-card.popular {
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.coin-product-badge-popular {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.coin-product-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.coin-product-card:hover .coin-product-img {
    transform: scale(1.04);
}

.coin-product-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.coin-product-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 6px 0;
}

.coin-product-coins {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fef08a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.coin-product-coins-sub {
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: normal;
}

.coin-product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.coin-product-price-tax {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: normal;
    margin-left: 4px;
}

.coin-product-headline {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0 0 16px 0;
    min-height: 2.6em;
}

.btn-buy-coin {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
}

.btn-buy-coin:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
    color: #ffffff;
}

/* 課金の説明セクション */
.coin-guide-section {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px 26px;
}

.coin-guide-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #334155;
    padding-bottom: 12px;
}

.coin-guide-block {
    margin-bottom: 22px;
}

.coin-guide-block:last-child {
    margin-bottom: 0;
}

.coin-guide-subtitle {
    font-size: 1.05rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-guide-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.7;
    margin: 0 0 8px 0;
}

.coin-steps-list {
    margin: 10px 0 14px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-step-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.coin-step-num {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.coin-guide-alert {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    color: #fde68a;
    line-height: 1.6;
    margin-top: 10px;
}

/* ==========================================================================
   📱 モバイル用ボトムナビゲーション (Mobile Bottom Navigation)
   ========================================================================== */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 990;
        height: 60px;
        background: rgba(15, 23, 42, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(56, 189, 248, 0.2);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
        padding: 0 0.25rem;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        justify-content: space-around;
        align-items: center;
        transform: translateY(130%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    }

    .mobile-bottom-nav.is-visible {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .bottom-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #94a3b8;
        font-size: 0.68rem;
        font-weight: 600;
        gap: 2px;
        flex: 1;
        min-width: 0;
        height: 100%;
        transition: color 0.2s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-link:active {
        transform: scale(0.94);
        color: #38bdf8;
    }

    .bottom-nav-icon {
        font-size: 1.35rem;
        line-height: 1;
    }

    .bottom-nav-label {
        line-height: 1.1;
        white-space: nowrap;
    }

    /* 🏝️ 「My島」ボタン (島のような形で横に大きく中央配置) */
    .bottom-nav-island-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1.25;
        padding: 0 2px;
        position: relative;
    }

    .bottom-nav-island-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        width: 82px;
        height: 58px;
        margin-top: -22px;
        background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
        border: 3px solid #0f172a;
        border-radius: 40px / 28px;
        /* 横長で島のような有機的フォルム */
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45), 0 0 0 2px rgba(56, 189, 248, 0.4);
        color: #ffffff;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .bottom-nav-island-btn:active {
        transform: scale(0.94);
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    }

    .bottom-nav-island-icon {
        font-size: 1.55rem;
        line-height: 1;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    }

    .bottom-nav-island-label {
        font-size: 0.72rem;
        font-weight: 800;
        color: #f0fdf4;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        margin-top: 2px;
        letter-spacing: 0.02em;
    }

    /* フッターがボトムナビに隠れず、十分な下側余白を確保 */
    footer {
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
    }
}











/* ----------------------------------------------------
 * ランキング10位の下「全x島」サマリー行
 * ---------------------------------------------------- */
.tr-ranking-total-row {
    background: rgba(30, 41, 59, 0.85) !important;
    border-top: 2px solid #3b82f6 !important;
    border-bottom: 2px solid #3b82f6 !important;
}

.ranking-total-row-cell {
    padding: 12px 16px !important;
    text-align: center;
}

.ranking-total-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fef08a;
    font-weight: bold;
    font-size: 1.05rem;
    padding: 6px 20px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ----------------------------------------------------
 * 遠隔ニュース速報 バッジスタイル
 * ---------------------------------------------------- */
.log-cat-badge.log-cat-enkaku {
    background-color: rgba(234, 179, 8, 0.25);
    border: 1px solid #eab308;
    color: #fef08a;
    font-weight: bold;
}

.log-cat-badge.log-cat-disaster {
    background-color: rgba(239, 68, 68, 0.25);
    border: 1px solid #ef4444;
    color: #fca5a5;
    font-weight: bold;
}

.news-item.cat-enkaku {
    border-left: 3px solid #eab308;
}

.news-item.cat-disaster {
    border-left: 3px solid #ef4444;
}

/* ----------------------------------------------------
 * 遠隔諸島 掲示板 (BBS) スタイル
 * ---------------------------------------------------- */
.bbs-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.bbs-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.bbs-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f3f4f6;
    margin-bottom: 0.4rem;
}

.bbs-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
}

.bbs-guest-card {
    background: #0f172a;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.bbs-guest-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.bbs-guest-title {
    font-size: 1.4rem;
    color: #f8fafc;
    margin-bottom: 0.8rem;
}

.bbs-guest-desc {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.bbs-guest-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bbs-form-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bbs-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bbs-author-badge {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.bbs-char-counter {
    font-size: 0.85rem;
    color: #94a3b8;
}

.bbs-textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.bbs-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bbs-help-text {
    color: #64748b;
    font-size: 0.8rem;
}

.bbs-posts-section {
    margin-top: 1.5rem;
}

.bbs-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.bbs-posts-header h3 {
    font-size: 1.25rem;
    color: #f3f4f6;
    margin: 0;
}

.bbs-total-count {
    font-size: 0.9rem;
    color: #94a3b8;
}

.bbs-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bbs-post-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    transition: transform 0.15s, border-color 0.15s;
}

.bbs-post-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.bbs-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: #94a3b8;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.bbs-post-island {
    font-weight: bold;
    color: #60a5fa;
}

.bbs-post-owner {
    color: #cbd5e1;
}

.bbs-post-time {
    color: #64748b;
    font-size: 0.8rem;
}

.bbs-post-body {
    color: #f1f5f9;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
}

.bbs-empty-card {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: #94a3b8;
}

.bbs-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* ----------------------------------------------------
 * 遠隔ニュース速報 援助スタイル
 * ---------------------------------------------------- */
.log-cat-badge.log-cat-support {
    background-color: rgba(59, 130, 246, 0.25);
    border: 1px solid #3b82f6;
    color: #93c5fd;
    font-weight: bold;
}

.news-item.cat-support {
    border-left: 3px solid #3b82f6;
}

/* ----------------------------------------------------
 * 島ランキング 4タブスタイル
 * ---------------------------------------------------- */
.ranking-tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ranking-tab-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ranking-tab-btn:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.45);
}

.ranking-tab-btn.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    border-color: #34d399;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.ranking-tab-btn[data-tab="total"].active {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.ranking-tab-btn[data-tab="money"].active {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.ranking-tab-btn[data-tab="food"].active {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.ranking-table.highlight-pop td.col-pop,
.ranking-table.highlight-money td.col-money,
.ranking-table.highlight-food td.col-food {
    color: var(--highlight-color);
    font-weight: 700;
}

.mobile-stats-compact .stat-highlight {
    color: var(--highlight-color);
    font-weight: 700;
}

/* ==========================================================================
   🚢 新規開拓 航海中ローディングモーダル (Voyage Loading Modal)
   ========================================================================== */
.voyage-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.voyage-modal-overlay.hidden {
    display: none !important;
}

.voyage-modal-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.25);
    animation: voyage-modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes voyage-modal-pop {
    0% {
        transform: scale(0.92);
        opacity: 0;
    }

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

.voyage-animation-box {
    margin-bottom: 1.5rem;
    position: relative;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voyage-spinner {
    width: 72px;
    height: 72px;
    border: 3px solid rgba(245, 158, 11, 0.2);
    border-top-color: #f59e0b;
    border-right-color: #fbbf24;
    border-radius: 50%;
    animation: voyage-spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    position: absolute;
}

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

.voyage-ship {
    font-size: 2.8rem;
    animation: ship-bob 2.2s ease-in-out infinite alternate;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

@keyframes ship-bob {
    0% {
        transform: translateY(0px) rotate(-5deg);
    }

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

.voyage-message {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    min-height: 1.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.voyage-subtext {
    font-size: 0.85rem;
    color: #94a3b8;
}
/* 画面下部の小さな通知（数秒で自動的に消える・モーダルではない） */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 9000;
    max-width: calc(100% - 32px);
    padding: 0.6rem 1rem;
    background-color: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    border: 1px solid #38bdf8;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
