:root {
    --analysis-ink: #102a43;
    --analysis-muted: #64748b;
    --analysis-line: #dbe4ee;
    --analysis-cyan: #0891b2;
    --analysis-bg: #f4f7fb;
}
.analysis-public { margin: 0; background: var(--analysis-bg); color: var(--analysis-ink); }
.analysis-public .public-header { position: static; box-shadow: 0 1px 8px rgba(0,0,0,.06); }
.analysis-wrap { max-width: 1180px; margin: auto; padding: 30px 20px 60px; }
.analysis-hero { position: relative; overflow: hidden; border-radius: 18px; padding: clamp(28px, 6vw, 62px); color: #fff; background: radial-gradient(circle at 82% 12%, rgba(34,211,238,.28), transparent 28%), linear-gradient(135deg,#071827,#123b58); box-shadow: 0 20px 45px rgba(15,23,42,.12); }
.analysis-hero h1 { margin: 7px 0 14px; color: #fff; font-size: clamp(30px,5vw,52px); line-height: 1.25; }
.analysis-kicker { color: #67e8f9; font-weight: 900; letter-spacing: .08em; }
.analysis-lead { max-width: 820px; color: #d7e3ec; line-height: 1.85; }
.analysis-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.analysis-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 11px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: 13px; }
.analysis-keyword-settings { margin-top: 24px; padding: clamp(18px,3vw,28px); background: #fff; border: 1px solid var(--analysis-line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.analysis-keyword-settings-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.analysis-keyword-settings-heading h2 { margin: 3px 0 0; color: #0f172a; font-size: 22px; }
.analysis-keyword-settings-heading p { max-width: 600px; margin: 0; color: var(--analysis-muted); font-size: 14px; line-height: 1.7; }
.analysis-settings-kicker { color: var(--analysis-cyan); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.analysis-keyword-settings-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.analysis-keyword-setting { overflow: hidden; border: 1px solid #e2e8f0; border-top: 3px solid var(--keyword-color); border-radius: 10px; background: #f8fafc; }
.analysis-keyword-setting h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 15px; color: #1e293b; font-size: 16px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.analysis-keyword-color { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--keyword-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--keyword-color) 18%, transparent); }
.analysis-keyword-setting dl { margin: 0; padding: 5px 15px 9px; }
.analysis-keyword-term { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #e2e8f0; }
.analysis-keyword-term:last-child { border-bottom: 0; }
.analysis-keyword-term dt { color: var(--analysis-muted); font-size: 12px; font-weight: 800; }
.analysis-keyword-term dd { min-width: 0; margin: 0; color: #0f172a; font-weight: 800; overflow-wrap: anywhere; }
.analysis-keyword-term.is-empty dd { color: #94a3b8; font-weight: 500; }
.analysis-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 24px 0; padding: 16px; background: #fff; border: 1px solid var(--analysis-line); border-radius: 12px; }
.analysis-toolbar label { display: grid; gap: 5px; font-weight: 800; color: #334155; }
.analysis-toolbar select, .analysis-toolbar input { min-height: 42px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.analysis-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.analysis-card, .analysis-panel { background: #fff; border: 1px solid var(--analysis-line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.analysis-card { padding: 20px; }
.analysis-card h2, .analysis-card h3 { margin: 0 0 9px; color: #0f172a; }
.analysis-number { margin: 6px 0; font-size: clamp(27px,4vw,40px); line-height: 1; font-weight: 900; }
.analysis-muted { color: var(--analysis-muted); }
.analysis-panel { margin-top: 18px; padding: clamp(16px,3vw,26px); }
.analysis-panel h2 { margin: 0 0 18px; font-size: 22px; }
.analysis-chart { position: relative; min-height: 360px; }
.analysis-theme-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.analysis-theme-card { display: flex; min-height: 250px; flex-direction: column; padding: 22px; color: inherit; text-decoration: none; background: #fff; border: 1px solid var(--analysis-line); border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease; }
.analysis-theme-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15,23,42,.1); }
.analysis-theme-card h2 { margin: 10px 0; font-size: 21px; line-height: 1.45; }
.analysis-theme-card .analysis-meta { margin-top: auto; }
.analysis-theme-card .analysis-chip { color: #0e7490; background: #ecfeff; border-color: #cffafe; }
.analysis-rankings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.analysis-ranking { margin: 0; padding: 0; list-style: none; }
.analysis-ranking li { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid #edf2f7; }
.analysis-rank { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e6f9fc; color: #0e7490; font-weight: 900; }
.analysis-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.analysis-tab { padding: 8px 13px; border: 1px solid #cbd5e1; border-radius: 999px; color: #334155; text-decoration: none; font-weight: 800; background: #fff; }
.analysis-tab.is-active { color: #fff; border-color: var(--analysis-cyan); background: var(--analysis-cyan); }
.analysis-articles { width: 100%; border-collapse: collapse; }
.analysis-articles th, .analysis-articles td { padding: 12px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.analysis-articles th { color: #475569; font-size: 13px; }
.analysis-articles a { color: #0369a1; font-weight: 700; text-decoration: none; }
.analysis-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.analysis-pagination a, .analysis-pagination span { min-width: 38px; padding: 8px 10px; border-radius: 7px; text-align: center; text-decoration: none; border: 1px solid #cbd5e1; background: #fff; color: #334155; }
.analysis-pagination span { color: #fff; border-color: var(--analysis-cyan); background: var(--analysis-cyan); }
.analysis-empty { padding: 34px; text-align: center; color: var(--analysis-muted); }
.analysis-footer { padding: 30px 20px; border-top: 1px solid var(--analysis-line); background: #fff; color: #64748b; text-align: center; }
.analysis-admin-form { display: grid; gap: 18px; max-width: 1100px; }
.analysis-admin-panel { padding: 20px; background: #fff; border: 1px solid #dbe4ee; border-radius: 9px; }
.analysis-admin-panel h2 { margin-top: 0; }
.analysis-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.analysis-field { display: grid; gap: 6px; }
.analysis-field.full { grid-column: 1 / -1; }
.analysis-field input, .analysis-field textarea, .analysis-field select { box-sizing: border-box; width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 6px; }
.analysis-keyword-admin { display: grid; grid-template-columns: 1.1fr 1fr 1fr 120px; gap: 12px; padding: 15px 0; border-top: 1px solid #e5e7eb; }
.analysis-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.analysis-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 13px; border: 1px solid #0891b2; border-radius: 6px; background: #fff; color: #08748c; text-decoration: none; cursor: pointer; font-weight: 800; }
.analysis-btn.primary { color: #fff; background: #0891b2; }
.analysis-btn.danger { color: #b91c1c; border-color: #ef4444; }
.analysis-notice { padding: 12px 14px; margin-bottom: 16px; border-radius: 7px; border: 1px solid #bae6fd; background: #f0f9ff; color: #075985; }
.analysis-notice.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
@media (max-width: 900px) {
    .analysis-grid, .analysis-theme-list, .analysis-rankings, .analysis-keyword-settings-list { grid-template-columns: 1fr; }
    .analysis-keyword-admin { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .analysis-keyword-settings-heading { display: grid; gap: 10px; }
    .analysis-keyword-term { grid-template-columns: 94px minmax(0,1fr); }
    .analysis-form-grid, .analysis-keyword-admin { grid-template-columns: 1fr; }
    .analysis-articles thead { display: none; }
    .analysis-articles tr { display: grid; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
    .analysis-articles td { padding: 4px 0; border: 0; }
}
