body {
    background: #020617;
    color: #e5e7eb;
    font-family: sans-serif;
    padding: 16px;
}

.keyword {
    margin-bottom: 40px;
}

.keywords {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keywords a {
    padding: 6px 12px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid #334155;
    color: #93c5fd;
    font-size: 13px;
    text-decoration: none;
}

.keywords a:hover {
    background: #1e293b;
}

.list {
    margin-top: 20px;
}

.scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    flex-wrap: nowrap;
}

.card {
    width: 420px;
    flex: 0 0 420px;
    background: #111827;
    padding: 14px;
    border-radius: 12px;
    scroll-snap-align: start;
}

/* =====================
   Mobile Overflow Fix
===================== */
@media (max-width: 600px) {
    .scroll {
        padding-right: 16px;
    }

    .card {
        width: calc(90vw - 64px);
        flex: 0 0 calc(90vw - 64px);
        min-width: calc(90vw - 64px);
    }

    .analysis-text {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

textarea {
    width: 100%;
    height: 220px;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px;
}

.title {
    font-weight: 700;
}

.muted {
    font-size: 13px;
    color: #94a3b8;
}

a {
    color: #38bdf8;
}

/* Thinking Overlay */
#thinking-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#thinking-box {
    background: #111827;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 24px 32px;
    text-align: center;
}

#thinking-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

#thinking-sub {
    font-size: 13px;
    color: #94a3b8;
}

#loading-indicator {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    display: none;
}

#loading-indicator.show {
    display: block;
}

/* =====================
   Heading Size Normalize
===================== */
h1 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 24px 0 16px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin: 16px 0 8px;
}

/* =====================
   Header Bar
===================== */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.cms-logo img {
    width: 160px;
    height: auto;
}

.aitrend-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.aitrend-link img {
    width: 32px;
    height: auto;
}

.aitrend-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== スマホ最適化 ===== */
@media (max-width: 600px) {
    .header-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .cms-logo img {
        width: 140px;
    }

    .aitrend-text {
        font-size: 15px;
    }
}
