/* =========================================================
   水防活動支援システム 共通CSS
   ファイル名：suibo-renewal.css
   目的：トップページ・レベル画面・チェックリスト共通の見た目を整える
   ========================================================= */
/* ---------------------------------------------------------
   1. 基本設定
   --------------------------------------------------------- */

:root {
    --bg: #f4f8fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --primary: #0f75bc;
    --primary-dark: #075985;
    --safe: #06b6d4;
    --lv1: #facc15;
    --lv2: #fb923c;
    --lv3: #ef4444;
    --line: #dbe7f0;
    --shadow: 0 10px 28px rgba(15, 35, 70, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: auto !important;
    max-width: none !important;
    margin: 0;
    padding: 0 0 88px;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    font-size: 18px;
    line-height: 1.75;
}

a {
    color: inherit;
}
/* ---------------------------------------------------------
   2. 共通レイアウト
   --------------------------------------------------------- */

.suibo-shell {
    width: min(1100px, calc(100% - 24px));
    margin: auto;
}

.suibo-card {
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.suibo-section-title {
    margin: 26px 0 12px;
    padding-left: 12px;
    border-left: 8px solid var(--primary);
    font-size: 26px;
}

.suibo-note {
    background: #f8fbff;
    border-left: 7px solid var(--primary);
}
/* ---------------------------------------------------------
   3. 上部ナビゲーション
   --------------------------------------------------------- */

.suibo-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(15, 35, 70, 0.06);
    backdrop-filter: blur(12px);
}

.suibo-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
}

.suibo-brand {
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}

.suibo-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suibo-nav a, .suibo-nav button, .suibo-print {
    padding: 8px 14px;
    background: #eaf4fb;
    border: 0;
    border-radius: 999px;
    color: #075985;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.suibo-nav a:hover, .suibo-nav button:hover, .suibo-print:hover {
    background: #d7ecfa;
}
/* ---------------------------------------------------------
   4. トップページ ヒーローエリア
   --------------------------------------------------------- */

.suibo-hero {
    margin-bottom: 20px;
    padding: 30px 16px;
    background: linear-gradient(135deg, #075985, #0ea5e9);
    border-radius: 0 0 28px 28px;
    box-shadow: var(--shadow);
    color: #ffffff;
}

.suibo-hero h1 {
    margin: 0;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.25;
    text-align: center;
}

.suibo-hero p {
    max-width: 800px;
    margin: 10px auto 0;
    color: #e0f2fe;
    text-align: center;
}
/* ---------------------------------------------------------
   5. ボタン・カード
   --------------------------------------------------------- */

.suibo-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 18px auto;
}

.suibo-btn {
    display: block;
    min-height: 78px;
    padding: 18px 14px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    transition: 0.15s transform, 0.15s filter;
}

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

.suibo-btn small {
    display: block;
    font-weight: 700;
    opacity: 0.8;
}

.manual {
    background: #dff3fb;
}

.check {
    background: #ffe4e9;
}

.danger {
    background: #fee2e2;
}
/* ---------------------------------------------------------
   6. レベル別カード
   --------------------------------------------------------- */

.suibo-levels {
    display: grid;
    gap: 16px;
}

.suibo-level-card {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.5fr) minmax(210px, 0.9fr);
    align-items: stretch;
    gap: 12px;
}

.suibo-level-main {
    color: #111827;
}

.lv0 {
    background: #c7f9ff;
}

.lv1 {
    background: #fde68a;
}

.lv2 {
    background: #fdba74;
}

.lv3 {
    background: #fecaca;
}

.suibo-actions {
    display: grid;
    gap: 10px;
}
/* ---------------------------------------------------------
   7. チェックリスト進捗表示
   --------------------------------------------------------- */

.suibo-progress-box {
    position: sticky;
    top: 58px;
    z-index: 40;
    margin: 12px auto;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.suibo-progress-bar {
    height: 14px;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 999px;
}

.suibo-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9, #22c55e);
    transition: width 0.2s;
}

.suibo-progress-text {
    margin-top: 6px;
    font-weight: 900;
    text-align: center;
}

.suibo-complete {
    display: none;
    margin: 12px auto;
    padding: 14px;
    background: #dcfce7;
    border: 2px solid #22c55e;
    border-radius: 16px;
    color: #166534;
    font-weight: 900;
    text-align: center;
}
/* ---------------------------------------------------------
   8. 下部固定ボタン
   --------------------------------------------------------- */

.suibo-fixed-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    padding: 10px;
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 22px rgba(15, 35, 70, 0.12);
}

.suibo-fixed-actions-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: min(900px, calc(100% - 16px));
    margin: auto;
}

.suibo-fixed-actions a, .suibo-fixed-actions button {
    padding: 12px 10px;
    background: #eaf4fb;
    border: 0;
    border-radius: 14px;
    color: #075985;
    cursor: pointer;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.suibo-fixed-actions .start {
    background: #dcfce7;
    color: #166534;
}

.suibo-fixed-actions .reset {
    background: #fee2e2;
    color: #991b1b;
}

.suibo-backtop {
    position: fixed;
    right: 14px;
    bottom: 82px;
    z-index: 71;
    padding: 12px 14px;
    background: #075985;
    border: 0;
    border-radius: 999px;
    box-shadow: var(--shadow);
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
}
/* ---------------------------------------------------------
   9. チェックリスト・表
   --------------------------------------------------------- */

table {
    overflow: hidden;
    background: #ffffff;
    border-radius: 12px;
}

td, th {
    padding: 10px !important;
    font-size: 18px !important;
}

input[type="checkbox"] {
    width: 30px !important;
    height: 30px !important;
    accent-color: #0f75bc;
}

tr:has(input[type="checkbox"]:checked) {
    background: #ecfdf5 !important;
}
/* ---------------------------------------------------------
   10. スマホ対応
   --------------------------------------------------------- */

@media (max-width: 760px) {

    body {
        font-size: 17px;
    }

    .suibo-quick-grid, .suibo-level-card {
        grid-template-columns: 1fr;
    }

    .suibo-topbar-inner {
        align-items: flex-start;
    }

    .suibo-nav {
        justify-content: flex-end;
    }

    .suibo-card {
        padding: 14px;
    }

    .suibo-btn {
        min-height: auto;
        padding: 16px;
    }

    .suibo-progress-box {
        top: 54px;
    }

    .suibo-fixed-actions-inner {
        grid-template-columns: 1fr 1fr 1fr;
    }

    td, th {
        padding: 8px !important;
        font-size: 16px !important;
    }

    .table-wrapper {
        overflow-x: auto;
    }
}
/* ---------------------------------------------------------
   11. 印刷対応
   --------------------------------------------------------- */

@media print {

    .suibo-topbar, .suibo-fixed-actions, .suibo-backtop, .suibo-progress-box {
        display: none !important;
    }

    body {
        padding: 0;
        background: #ffffff;
        font-size: 12pt;
    }

    .suibo-card, table {
        border: 1px solid #999999 !important;
        box-shadow: none !important;
    }

    a {
        text-decoration: none;
    }
}
