/* 
  Action Card App Stylesheet (PWA / Mobile First / UI Rich)
*/

:root {
    --color-a: #e53935; /* 本部 (Red) */
    --color-b: #fb8c00; /* 救援 (Orange) */
    --color-c: #43a047; /* インフラ (Green) */
    --color-d: #1e88e5; /* 住民 (Blue) */
    --bg-color: #f5f5f5;
    --text-color: #333;
    --card-bg: #fff;
    --bottom-nav-height: 60px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 隠しクラス (言語切替用) */
.hidden {
    display: none !important;
}

/* ヘッダー */
.app-header {
    background-color: #333;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-header h1 {
    font-size: 1.2rem;
    margin: 0;
}

.lang-toggle {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.lang-btn.active {
    background: white;
    color: #333;
    font-weight: bold;
}

/* メイン領域 */
main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}
.pb-20 {
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

/* セクションタイトル */
.category-title {
    margin: 1.5rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 4px solid;
}
.category-title.c-A { border-left-color: var(--color-a); }
.category-title.c-B { border-left-color: var(--color-b); }
.category-title.c-C { border-left-color: var(--color-c); }
.category-title.c-D { border-left-color: var(--color-d); }

/* カードグリッド */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* トップページのカード */
.action-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 6px solid #ccc; /* JSで色上書き */
    transition: transform 0.1s, box-shadow 0.1s;
}

.action-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-meta {
    font-size: 0.85rem;
    color: #666;
}

/* ボトムナビゲーション (Phase 1.7) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background-color: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 900;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-btn.active {
    color: #333;
}

.nav-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.nav-text {
    font-size: 0.7rem;
    font-weight: bold;
}

/* -------------------------------------
   詳細ページ (card.html)
-------------------------------------- */
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #1e88e5;
    text-decoration: none;
    font-weight: bold;
}

.detail-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-top: 8px solid #ccc; /* JSで色上書き */
}

.detail-card h2 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-meta p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.3rem;
}

/* チェックリスト */
.checklist {
    margin-top: 1.5rem;
}
.checklist h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.3rem;
}

/* タップ可能なリストアイテム */
.check-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    cursor: pointer; /* タップ可能を示す */
    transition: background-color 0.2s;
}
.check-item:hover, .check-item:active {
    background-color: #eef;
}
.check-item input[type="checkbox"] {
    margin-top: 0.3rem;
    margin-right: 0.8rem;
    transform: scale(1.3);
    cursor: pointer;
}
.check-text {
    flex-grow: 1;
    font-size: 1rem;
}
.info-icon {
    margin-left: 0.5rem;
    color: #1e88e5;
    font-size: 1.2rem;
}

/* 印刷ボタン */
.print-btn {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

/* Bottom Sheet (ドリルダウン詳細) */
.sheet-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    transition: opacity 0.3s ease;
}

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

.bottom-sheet {
    background: #fff;
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
}

.sheet-overlay:not(.hidden) .bottom-sheet {
    transform: translateY(0);
}

.sheet-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

.sheet-handle {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 3px;
    margin-bottom: 10px;
}

.sheet-close-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

/* -------------------------------------
   Emergency Mode & Phase 1.8 UI
------------------------------------- */

/* Quick Action Panel */
.quick-action-panel {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
    text-align: center;
}
.quick-action-panel h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: white;
}
.quick-buttons {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}
.quick-btn {
    flex: 1;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.8rem 0.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.quick-btn:active {
    background: rgba(255,255,255,0.4);
}

/* Mode Toggle Switch */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: white;
}
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #4CAF50; /* 訓練モード(緑) */
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: #f44336; /* 緊急モード(赤) */
}
input:checked + .slider:before {
    transform: translateX(20px);
}
.slider.round {
    border-radius: 20px;
}
.slider.round:before {
    border-radius: 50%;
}
.mode-label { opacity: 0.6; }
input:checked ~ .emergency-label { opacity: 1; font-weight: bold; }
input:not(:checked) ~ .mode-label:not(.emergency-label) { opacity: 1; font-weight: bold; }

/* Emergency Mode Body Styles */
body.emergency-mode .app-header {
    background: linear-gradient(135deg, #d32f2f, #f44336) !important;
}
body.emergency-mode .bottom-nav {
    border-top: 2px solid #d32f2f;
}
body.emergency-mode .check-item {
    border-left: 4px solid #f44336;
}
/* 緊急モードでは詳細アイコン(i)を非表示にする（チェックに集中） */
body.emergency-mode .info-icon {
    display: none;
}
body.emergency-mode .check-text {
    font-size: 1.1rem; /* 読みやすく大きく */
}

.sheet-content p {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

/* -------------------------------------
   Graphic / Infographic UI (Phase 1.9)
------------------------------------- */
.sheet-overlay.fullscreen .bottom-sheet {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding-top: 2rem;
}

.graphic-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.graphic-box h3 { margin-top:0; font-size: 1.1rem; color: #333; margin-bottom: 1rem; }
.graphic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}
.graphic-grid .box {
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
}
.box.hq { background: #4CAF50; }
.box.medic { background: #f44336; }
.box.sleep { background: #2196F3; }
.box.toilet { background: #9E9E9E; }

.graphic-step {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
}
.graphic-step span {
    background: var(--color-b);
    color: white;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    font-weight: bold;
}

.triage-flow {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}
.flow-box {
    border-left: 4px solid #999;
    padding-left: 10px;
    margin-bottom: 1rem;
}
.flow-q { font-weight: bold; margin-bottom: 0.5rem; font-size:1.1rem;}
.flow-yes, .flow-no { margin-bottom: 0.25rem; font-size: 0.95rem;}

/* -------------------------------------
   Print Mode (PDF Export)
------------------------------------- */
@media print {
    body {
        background: white;
        color: black;
        margin: 0;
        padding: 0;
    }
    .app-header, .back-link, #print-btn, .bottom-nav, .quick-action-panel, .info-icon {
        display: none !important;
    }
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .detail-card {
        box-shadow: none;
        border: 2px solid #ccc;
        page-break-inside: avoid;
    }
    .graphic-box, .triage-flow {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    .sheet-overlay { display: none !important; }
}

/* -------------------------------------
   Phase 1.10: Settings & Contact List
------------------------------------- */

.settings-panel {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.settings-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.save-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

.print-contacts-btn {
    width: 100%;
    background: #2196F3;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.settings-form-group {
    margin-bottom: 1rem;
    background: #f9f9f9;
    padding: 0.8rem;
    border-radius: 6px;
    border-left: 4px solid #ccc;
}

.settings-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.settings-form-group input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* @media print for Settings Panel (Emergency Contact List) */
@media print {
    body.settings-active .app-header,
    body.settings-active .bottom-nav,
    body.settings-active .quick-action-panel,
    body.settings-active #cards-container,
    body.settings-active .print-contacts-btn,
    body.settings-active #settings-save-btn {
        display: none !important;
    }

    body.settings-active {
        background: white !important;
    }

    body.settings-active .settings-panel {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    body.settings-active #settings-form-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    body.settings-active .settings-form-group {
        break-inside: avoid;
        border: 1px solid #000;
        background: white;
        padding: 5px;
        margin-bottom: 0;
    }

    body.settings-active .settings-form-group input {
        border: none;
        border-bottom: 1px dashed #999;
        background: transparent;
        border-radius: 0;
        padding: 2px 0;
    }
}

/* Graphic Image Modal */
.image-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.image-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.image-modal-content {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    object-fit: contain;
}
.image-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}
.show-graphic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background-color: var(--color-d);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.show-graphic-btn i {
    font-size: 1.3rem;
}

/* ----------------------------------------------------
 * Phase 1.12: My Survival Card
 * ---------------------------------------------------- */
.my-card-container {
    padding: 10px;
}

.my-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-d);
    padding-bottom: 10px;
}

.my-card-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.edit-btn {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* View Mode (Emergency Display) */
.my-card-view {
    background-color: #fff;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

.medical-alert-banner {
    background-color: #e74c3c;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 4px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.my-info-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}
.my-info-group:last-child {
    border-bottom: none;
}

.my-info-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: bold;
}

.my-info-value {
    display: block;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: bold;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.my-info-value.empty {
    color: #bdc3c7;
    font-style: italic;
    font-size: 1rem;
}

/* Important Highlight (Allergies, Meds) */
.highlight-red .my-info-value {
    color: #e74c3c;
    font-size: 1.3rem;
}

/* Edit Mode (Form) */
.my-card-edit {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.save-mycard-btn {
    display: block;
    width: 100%;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

/* Share / Print Buttons */
.action-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    color: white;
    font-size: 1rem;
}

.btn-share {
    background-color: #3498db;
}

.btn-print {
    background-color: #34495e;
}

/* Print Styles for My Card */
@media print {
    .my-card-container {
        padding: 0;
    }
    .my-card-header, .action-buttons-row {
        display: none !important;
    }
    .my-card-view {
        border: 2px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    .medical-alert-banner {
        background-color: #000 !important; /* fallback */
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .highlight-red .my-info-value {
        color: #000; /* Use bold/black for print */
        text-decoration: underline;
    }
}

/* ----------------------------------------------------
 * Phase 1.13: App Intro (Onboarding)
 * ---------------------------------------------------- */
.app-intro {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f1f8ff;
    border: 1px solid #d0e8ff;
    border-radius: 8px;
    padding: 15px 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.intro-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.intro-step:not(:last-child) {
    border-right: 1px dashed #bcdcff;
}

.intro-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.intro-text {
    font-size: 0.75rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
}

/* ----------------------------------------------------
 * Phase 2.1: TTS and Collaboration Icons
 * ---------------------------------------------------- */
.collab-icon {
    font-size: 1.1rem;
    margin-right: 4px;
    vertical-align: middle;
}

.btn-speak {
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.1s;
}
.btn-speak:hover {
    opacity: 1;
    transform: scale(1.1);
}
.btn-speak:active {
    transform: scale(0.9);
}

/* ----------------------------------------------------
 * Phase 2.2: AAR Modal and Print Styling
 * ---------------------------------------------------- */
#aar-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

#aar-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#aar-modal .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* ----------------------------------------------------
 * Phase 2.3: Star Rating & Submit Styles
 * ---------------------------------------------------- */
.aar-form-group {
    margin-bottom: 15px;
}
.aar-form-group label {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #444;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 2rem;
    line-height: 1;
}
.star-rating .star {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
    margin-right: 5px;
}
.star-rating .star:hover,
.star-rating .star:hover ~ .star,
.star-rating .star.active,
.star-rating .star.active ~ .star {
    color: #ffca08; /* Yellow */
}

.status-success { color: #2e7d32; }
.status-error { color: #c62828; }
.status-pending { color: #f57f17; }

#aar-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

@media print {
    body.aar-active {
        background: #fff;
    }
    body.aar-active header,
    body.aar-active .bottom-nav,
    body.aar-active #cards-container,
    body.aar-active #card-detail,
    body.aar-active .app-intro,
    body.aar-active #btn-aar-save,
    body.aar-active .close-btn {
        display: none !important;
    }
    
    body.aar-active #aar-modal {
        display: block !important;
        position: static !important;
        background: none !important;
        width: 100% !important;
    }
    
    body.aar-active .modal-content {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    body.aar-active textarea {
        border: 1px solid #000; /* Ensure borders are visible in print */
        resize: none;
    }
}

/* ----------------------------------------------------
 * Phase 3: Edit Mode & Customization Styles
 * ---------------------------------------------------- */
.edit-only {
    display: none !important;
}

/* Edit Mode ON のときの表示切替 */
body.edit-mode .edit-only {
    display: block !important;
}

body.edit-mode span.edit-only,
body.edit-mode input.edit-only,
body.edit-mode button.edit-only {
    display: inline-block !important;
}

body.edit-mode .view-only {
    display: none !important;
}

/* 入力フォームの基本スタイル */
.edit-input, .edit-textarea, .edit-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.edit-textarea {
    resize: vertical;
    min-height: 60px;
}

/* 編集アイテムのコントロール（削除ボタンなど） */
.edit-item-controls {
    text-align: right;
    margin-top: 5px;
}

.btn-remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* 追加ボタン */
.btn-add-item {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    font-weight: bold;
    font-size: 1rem;
}

/* ----------------------------------------------------
 * Phase 1.13: App Intro Graphic Banner
 * ---------------------------------------------------- */
.app-intro {
    margin: 10px 0 20px 0;
    text-align: center;
    width: 100%;
}
.intro-graphic {
    max-width: 100%;
    height: 130px; /* 高さを固定して巨大化を防ぐ */
    object-fit: contain; /* 縦横比を維持したまま収める */
    border-radius: 12px;
    /* 白背景をアプリの背景色に透過・同化させる */
    mix-blend-mode: multiply;
}

/* 下部の固定ナビゲーションバーに隠れないようにするための余白 */
.pb-20 {
    padding-bottom: 80px !important;
}

