body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.dict-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.dict-header h1 { margin: 0; font-size: 2em; }
.sub-title { color: #bdc3c7; margin-top: 5px; font-weight: bold; letter-spacing: 1px; }
.description { margin-top: 15px; font-size: 0.9em; opacity: 0.9; }

.main-content { margin-top: -30px; position: relative; z-index: 10; }

/* 検索窓 */
.search-wrapper {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #eee;
    border-radius: 8px;
    box-sizing: border-box;
}

/* カテゴリータブ */
.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    white-space: nowrap;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #e0e0e0;
    color: #555;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.4);
}

/* グリッドレイアウト */
.dict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 50px;
}

.dict-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: transform 0.2s;
    border-top: 4px solid #ddd;
}

.dict-card:hover { transform: translateY(-3px); }

/* 判定色 */
.status-ng { border-top-color: #e74c3c; }
.status-caution { border-top-color: #f39c12; }
.status-ok { border-top-color: #2ecc71; }

.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-name { font-weight: bold; font-size: 1.2em; }
.badge { padding: 3px 8px; border-radius: 4px; font-size: 0.8em; color: white; font-weight: bold; }
.bg-ng { background: #e74c3c; }
.bg-caution { background: #f39c12; }
.bg-ok { background: #2ecc71; }

.card-summary { font-size: 0.9em; color: #666; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* モーダル */
.modal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #fff; margin: 5% auto; padding: 30px; width: 90%; max-width: 600px; border-radius: 10px; position: relative; max-height: 80vh; overflow-y: auto; }
.close-modal { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.modal-header { border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; }
.modal-title { font-size: 1.8em; margin: 0; color: #2c3e50; }
.modal-section { margin-bottom: 20px; }
.sec-title { font-weight: bold; color: #3498db; margin-bottom: 5px; display: block; }
.evidence-box { background: #f8f9fa; padding: 15px; border-radius: 5px; font-size: 0.85em; color: #555; border-left: 3px solid #7f8c8d; }

.dict-footer { text-align: center; padding: 40px 20px; color: #7f8c8d; font-size: 0.8em; }