/* BizNavi PWA - Google風デザイン */
:root {
    --navy: #1A2744;
    --teal: #028090;
    --seafoam: #00A896;
    --mint: #02C39A;
    --teal-light: #e0f7f5;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --primary: #1a56db;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: white;
    color: var(--gray-800);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   トップページ（Google風）
   ============================ */
.top-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 20px;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* ロゴ */
.top-logo {
    text-align: center;
    margin-bottom: 32px;
}

.top-logo-icon {
    font-size: 72px;
    display: block;
    margin-bottom: 8px;
}

.top-logo-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 1px;
}

.top-logo-sub {
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 4px;
    letter-spacing: 2px;
}

/* 挨拶 */
.top-greeting {
    font-size: 15px;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* 検索バー */
.search-container {
    width: 100%;
    max-width: 580px;
    position: relative;
    margin-bottom: 36px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 24px;
    padding: 12px 20px;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.search-bar:focus-within {
    border-color: var(--teal);
    box-shadow: 0 2px 12px rgba(2,128,144,0.15);
}

.search-icon {
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: var(--font);
    color: var(--gray-800);
    background: transparent;
}

.search-input::placeholder {
    color: var(--gray-400);
}

/* 検索結果ドロップダウン */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 360px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--gray-100);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--teal-light); }

.search-result-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}

.search-result-sub {
    font-size: 12px;
    color: var(--gray-400);
}

.search-result-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--teal-light);
    color: var(--teal);
}

/* メインメニュー */
.top-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 480px;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.menu-card:hover {
    background: var(--teal-light);
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-card-icon {
    font-size: 32px;
}

.menu-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.menu-card-sos {
    border-color: #fecaca;
    background: #fff5f5;
}

.menu-card-sos:hover {
    background: #fee2e2;
    border-color: var(--danger);
}

/* フッター */
.top-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--gray-400);
}

/* ============================
   サブページ
   ============================ */
.sub-page {
    min-height: 100vh;
    background: var(--gray-50);
}

.sub-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sub-back {
    border: none;
    background: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--teal);
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
}

.sub-back:hover { text-decoration: underline; }

.sub-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.sub-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 40px;
}

/* カテゴリカード */
.cat-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 12px;
}

.cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.cat-header:hover { background: var(--gray-50); }

.cat-icon { font-size: 24px; flex-shrink: 0; }
.cat-info { flex: 1; }
.cat-name { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.cat-desc { font-size: 12px; color: var(--gray-400); }
.cat-arrow { font-size: 18px; color: var(--gray-400); transition: transform 0.2s; }
.cat-card.open .cat-arrow { transform: rotate(90deg); }

.cat-scenes { display: none; padding: 4px 12px 12px; gap: 8px; flex-wrap: wrap; }
.cat-card.open .cat-scenes { display: flex; }

.scene-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 20px;
    background: white;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.scene-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: var(--teal-light);
}

/* アドバイスカード */
.advice-cards { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }

.advice-card {
    border-radius: var(--radius-sm);
    padding: 16px;
    border-left: 4px solid;
}

.advice-card.how-to { background: #e8effc; border-color: var(--primary); }
.advice-card.pitfall { background: #fef3c7; border-color: var(--warning); }
.advice-card.pro-tip { background: #d1fae5; border-color: var(--success); }

.advice-card-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.advice-card.how-to .advice-card-label { color: var(--primary); }
.advice-card.pitfall .advice-card-label { color: var(--warning); }
.advice-card.pro-tip .advice-card-label { color: var(--success); }

.advice-card ul { padding-left: 18px; font-size: 14px; color: var(--gray-700); line-height: 1.7; }
.advice-card li { margin-bottom: 4px; }
.advice-card p { font-size: 14px; color: var(--gray-700); line-height: 1.7; }

/* タスクフロー */
.flow-section {
    margin-top: 20px;
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.flow-title { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; }

.flow-step {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.flow-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.flow-step-body { flex: 1; }
.flow-step-label { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.flow-step-desc { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.flow-step-tip { font-size: 12px; color: var(--warning); margin-top: 4px; }

/* チェックリスト */
.check-group-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 0 6px;
    border-bottom: 1px solid var(--gray-100);
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    margin-bottom: 8px;
}

.check-item:hover { box-shadow: var(--shadow-md); }
.check-item.checked { background: #d1fae5; opacity: 0.8; }
.check-item.checked .check-label { text-decoration: line-through; color: var(--gray-400); }

.check-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    flex-shrink: 0;
}

.check-item.checked .check-box {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.check-label { font-size: 14px; color: var(--gray-700); flex: 1; }
.check-time { font-size: 11px; color: var(--gray-400); white-space: nowrap; }

/* SOS */
.sos-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 8px;
}

.sos-card:hover { border-color: var(--danger); background: #fff5f5; }
.sos-emoji { font-size: 28px; flex-shrink: 0; }
.sos-info { flex: 1; }
.sos-label { font-size: 14px; font-weight: 600; color: var(--gray-800); }

.sos-urgency {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.sos-urgency-common { background: #dbeafe; color: var(--primary); }
.sos-urgency-urgent { background: #fee2e2; color: var(--danger); }
.sos-urgency-health { background: #fef3c7; color: #ea580c; }

.sos-detail-section {
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.sos-first { background: #fee2e2; border-left: 4px solid var(--danger); }
.sos-steps-section { background: #e8effc; border-left: 4px solid var(--primary); }
.sos-donot { background: #fef3c7; border-left: 4px solid var(--warning); }

.sos-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sos-first .sos-section-label { color: var(--danger); }
.sos-steps-section .sos-section-label { color: var(--primary); }
.sos-donot .sos-section-label { color: var(--warning); }

.sos-detail-section p { font-size: 14px; color: var(--gray-700); line-height: 1.6; }
.sos-detail-section ol { padding-left: 20px; font-size: 14px; color: var(--gray-700); line-height: 1.8; }
.sos-detail-section li { margin-bottom: 4px; }

/* 時間帯サジェスション */
.suggestion-card {
    background: linear-gradient(135deg, var(--teal-light) 0%, #f0fdf9 100%);
    border: 1px solid rgba(2,128,144,0.1);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.suggestion-title { font-size: 16px; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; }

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.suggestion-item .s-icon { flex-shrink: 0; font-size: 18px; }

/* ユーティリティ */
.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* レスポンシブ */
@media (max-width: 480px) {
    .top-logo-title { font-size: 32px; }
    .top-logo-icon { font-size: 56px; }
    .top-menu { gap: 8px; }
    .menu-card { padding: 18px 12px; }
    .menu-card-icon { font-size: 26px; }
}
