body { 
    font-family: 'Noto Sans JP', sans-serif; 
    background-color: #FBF9F6;
    color: #4A4A4A;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.main-container {
    flex-grow: 1;
}
.font-serif-header {
    font-family: 'Cormorant Garamond', serif;
}
.search-form {
    border: 1px solid #EAEAEA;
    transition: all 0.3s ease;
}
.search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(180, 168, 136, 0.2);
    border-color: #B4A888;
}
.search-button {
    background-color: #6A8A82;
    transition: background-color 0.3s ease;
}
.search-button:hover {
    background-color: #59756F;
}
.loader { 
    border: 4px solid #EAEAEA; 
    border-top: 4px solid #6A8A82; 
    border-radius: 50%; width: 20px; height: 20px; 
    animation: spin 1s linear infinite; 
    display: inline-block; margin-right: 8px; vertical-align: middle; 
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.herb-card {
    background-color: #FFFFFF;
    border: 1px solid #F0F0F0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.herb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.herb-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.ai-badge { 
    position: absolute; top: 1rem; right: 1rem; 
    background-color: #B4A888;
    color: white; 
    padding: 0.25rem 0.75rem; 
    font-size: 0.75rem; 
    font-weight: 500;
    border-radius: 9999px; 
    letter-spacing: 0.5px;
    z-index: 2;
}
.evidence-badge {
    position: absolute; top: 1rem; right: 1rem;
    background-color: #6A8A82;
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
}
.contraindication-icon {
    position: absolute; top: 1rem; left: 1rem;
    background-color: #EF4444; /* red-500 */
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.image-container { 
    position: relative; width: 100%; height: 14rem; 
    background-color: #F5F5F5; 
}
.herb-card-img { 
    width: 100%; height: 100%; object-fit: cover; 
}
.effect-tag {
    background-color: #F0F5F3;
    color: #59756F;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Night Mode Warning Styles */
.herb-card.night-incompatible {
    opacity: 0.65;
}

/* Modal Styles */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(40, 40, 40, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1; visibility: visible;
}
.modal-container {
    background: #FFFFFF;
    border-radius: 12px;
    max-width: 95%;
    width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-overlay.visible .modal-container {
    transform: scale(1) translateY(0);
}
.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #EAEAEA;
}
.modal-body {
    padding: 1.5rem 2rem 2rem;
}
.detail-item {
    margin-bottom: 1.25rem;
}
.detail-label {
    font-weight: 500;
    color: #B4A888;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}
.cautions-box {
    background-color: #FEF2F2; /* red-50 */
    border-left: 4px solid #EF4444; /* red-500 */
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.cautions-title {
    font-weight: bold;
    color: #B91C1C; /* red-800 */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cautions-list {
    list-style-type: disc;
    list-style-position: inside;
    margin-top: 0.5rem;
    color: #7F1D1D; /* red-900 */
}

/* Footer Styles */
.site-footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9CA3AF;
    border-top: 1px solid #F3F4F6;
    margin-top: 4rem;
}

/* Night Mode Toggle Styles */
.toggle-checkbox:checked {
  right: 0;
  border-color: #6A8A82;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #6A8A82;
}
