.page-realtime-ideas .main {
    max-width: 1320px;
}

.realtime-ideas-topbar {
    align-items: center;
}

.realtime-ideas-notice {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid #ead294;
    border-radius: 12px;
    background: #fff8df;
    color: #74591b;
    font-size: 13px;
    line-height: 1.55;
}

.realtime-ideas-notice.error {
    border-color: #e8bcbc;
    background: #fff0f0;
    color: #913c3c;
}

.realtime-source-grid {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.realtime-source-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid #e0e7e3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(32, 60, 48, .04);
    display: grid;
    gap: 8px;
}

.realtime-source-card.status-error {
    border-color: #ecd0d0;
    background: #fffafa;
}

.realtime-source-card.status-stale {
    border-color: #ead8a6;
    background: #fffdf5;
}

.realtime-source-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.realtime-source-head strong {
    font-size: 14px;
}

.realtime-source-head span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #e5f1eb;
    color: #376a54;
    font-size: 9px;
    font-weight: 800;
}

.status-error .realtime-source-head span {
    background: #f5dddd;
    color: #9b4242;
}

.status-stale .realtime-source-head span {
    background: #f5e9c8;
    color: #856621;
}

.realtime-source-card > b {
    color: #244c3b;
    font-size: 23px;
}

.realtime-source-card time,
.realtime-source-card p {
    margin: 0;
    color: #7c8782;
    font-size: 11px;
    line-height: 1.45;
}

.realtime-ideas-panel {
    padding: 0 26px 20px;
}

.realtime-ideas-summary {
    min-height: 86px;
    border-bottom: 1px solid #e5e9e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.realtime-ideas-summary .eyebrow {
    margin-bottom: 5px;
}

.realtime-ideas-summary h2 {
    margin: 0;
    font-size: 19px;
}

.realtime-summary-meta {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.realtime-summary-meta strong {
    color: #275d4a;
    font-size: 20px;
}

.realtime-summary-meta span {
    color: #818b87;
    font-size: 11px;
}

.realtime-keyword-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.realtime-keyword-row {
    min-height: 63px;
    padding: 10px 4px;
    border-bottom: 1px solid #e8ece9;
    display: grid;
    grid-template-columns: 38px minmax(180px, 1fr) minmax(210px, auto);
    align-items: center;
    gap: 13px;
}

.realtime-keyword-row:last-child {
    border-bottom: 0;
}

.realtime-keyword-position {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #edf3f0;
    color: #397058;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
}

.realtime-keyword-row > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
}

.realtime-keyword-sources {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.realtime-keyword-sources span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2f0;
    color: #66736d;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.realtime-keyword-sources .source-daum {
    background: #fff5cf;
    color: #80650e;
}

.realtime-keyword-sources .source-googletrend {
    background: #e5f1ff;
    color: #356b9d;
}

.realtime-keyword-sources .source-naver {
    background: #e2f5e9;
    color: #257048;
}

.realtime-ideas-empty {
    padding: 75px 20px;
    text-align: center;
    color: #6f7b76;
}

.realtime-ideas-empty p {
    margin: 8px 0 0;
    font-size: 12px;
}

@media (max-width: 1000px) {
    .realtime-source-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .realtime-ideas-topbar {
        align-items: stretch;
    }

    .realtime-ideas-topbar .actions {
        width: 100%;
    }

    .realtime-ideas-topbar .actions .button {
        flex: 1;
    }

    .realtime-source-grid {
        grid-template-columns: 1fr;
    }

    .realtime-ideas-panel {
        padding: 0 16px 12px;
    }

    .realtime-ideas-summary {
        min-height: 96px;
    }

    .realtime-keyword-row {
        padding: 14px 2px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px 11px;
    }

    .realtime-keyword-sources {
        grid-column: 2;
        justify-content: flex-start;
    }
}

/* Generated title, outline and create prefill */
.realtime-generated-content {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #cfe0d7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(37, 79, 60, .06);
}

.realtime-generated-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.realtime-generated-head h5 {
    margin: 5px 0 0;
    font-size: 14px;
}

.realtime-generated-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.realtime-generated-actions button {
    padding: 8px 10px;
    border: 1px solid #d5e1db;
    border-radius: 8px;
    background: #fff;
    color: #416657;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.realtime-generated-actions button:disabled {
    cursor: default;
    opacity: .45;
}

.realtime-generated-actions .is-primary {
    border-color: #275d4a;
    background: #275d4a;
    color: #fff;
}

.realtime-generated-title {
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 10px;
    background: #eaf4ef;
    color: #244f3d;
    display: block;
    font-size: 16px;
    line-height: 1.5;
}

.realtime-generated-outline,
.realtime-generated-reference-wrap {
    margin-top: 15px;
}

.realtime-generated-outline h6,
.realtime-generated-reference-wrap h6 {
    margin: 0 0 8px;
    color: #43584f;
    font-size: 11px;
}

.realtime-generated-outline ol {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    list-style: none;
    counter-reset: realtime-outline;
}

.realtime-generated-outline li {
    position: relative;
    padding: 8px 10px 8px 30px;
    border-radius: 8px;
    background: #f5f7f6;
    color: #596760;
    counter-increment: realtime-outline;
    font-size: 10px;
    line-height: 1.45;
}

.realtime-generated-outline li::before {
    position: absolute;
    left: 10px;
    color: #39705a;
    content: counter(realtime-outline);
    font-weight: 900;
}

.realtime-generated-references {
    display: grid;
    gap: 5px;
}

.realtime-generated-references a {
    padding: 7px 9px;
    border-radius: 7px;
    background: #f4f7f5;
    color: #547666;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.realtime-generated-prompt-label {
    margin-top: 15px;
    display: grid;
    gap: 7px;
}

.realtime-generated-prompt-label > span {
    color: #43584f;
    font-size: 11px;
    font-weight: 800;
}

.realtime-generated-prompt {
    min-height: 260px;
    background: #fafcfb;
    color: #4d5c55;
    font-size: 11px;
    line-height: 1.65;
}

@media (max-width: 620px) {
    .realtime-generated-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .realtime-generated-actions {
        width: 100%;
        justify-content: stretch;
    }

    .realtime-generated-actions button {
        flex: 1;
    }

    .realtime-generated-outline ol {
        grid-template-columns: 1fr;
    }
}

/* Realtime idea selection and sorting */
.realtime-idea-controls {
    min-height: 64px;
    padding: 11px 0;
    border-bottom: 1px solid #e5e9e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.realtime-source-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.realtime-source-filters button {
    padding: 7px 10px;
    border: 1px solid #dfe6e2;
    border-radius: 999px;
    background: #fff;
    color: #68756f;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.realtime-source-filters button:hover,
.realtime-source-filters button.active {
    border-color: #39705a;
    background: #e8f2ed;
    color: #275d4a;
}

.realtime-source-filters button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.realtime-sort-control {
    margin-left: auto;
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 7px;
    color: #7a8680;
    font-size: 11px;
}

.realtime-sort-control select {
    width: auto;
    min-width: 104px;
    padding: 7px 28px 7px 10px;
    background-color: #fff;
    font-size: 11px;
}

.realtime-visible-count {
    min-width: 54px;
    color: #7e8984;
    font-size: 10px;
    text-align: right;
}

.realtime-keyword-row {
    min-height: 0;
    padding: 0;
    display: block;
}

.realtime-keyword-row[hidden] {
    display: none;
}

.realtime-keyword-select {
    width: 100%;
    min-height: 66px;
    padding: 10px 4px;
    border: 0;
    background: transparent;
    color: #18201d;
    display: grid;
    grid-template-columns: 38px minmax(180px, 1fr) 70px minmax(210px, auto) 24px;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    transition: background .16s ease;
}

.realtime-keyword-select:hover {
    background: #f8faf9;
}

.realtime-keyword-select:focus-visible {
    border-radius: 10px;
    outline: 2px solid #4e8c71;
    outline-offset: -2px;
}

.realtime-keyword-row.is-selected .realtime-keyword-select {
    background: #edf6f1;
}

.realtime-keyword-title {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.realtime-keyword-title strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
}

.realtime-keyword-title em {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: #ffe69a;
    color: #725000;
    font-size: 9px;
    font-style: normal;
    font-weight: 850;
}

.realtime-google-metrics {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.realtime-google-metrics small {
    padding: 3px 6px;
    border-radius: 6px;
    background: #edf4fb;
    color: #536b82;
    font-size: 9px;
    white-space: nowrap;
}

.realtime-google-metrics small b {
    color: #315c82;
}

.realtime-google-metrics .status-active {
    background: #e5f3eb;
    color: #2f7452;
}

.realtime-google-metrics .status-ended {
    background: #f1f1f1;
    color: #747474;
}

.realtime-keyword-score {
    display: grid;
    justify-items: center;
    gap: 1px;
}

.realtime-keyword-score b {
    color: #275d4a;
    font-size: 17px;
}

.realtime-keyword-score small {
    color: #8a9590;
    font-size: 8px;
}

.realtime-keyword-sources i,
.realtime-detail-sources span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2f0;
    color: #66736d;
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
    white-space: nowrap;
}

.realtime-keyword-chevron {
    color: #718078;
    font-size: 18px;
    text-align: center;
    transition: transform .18s ease;
}

.realtime-keyword-row.is-selected .realtime-keyword-chevron {
    transform: rotate(180deg);
}

.realtime-keyword-detail {
    margin: 0 4px 14px 54px;
    padding: 20px;
    border: 1px solid #d9e7e0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f6fbf8, #fff);
    box-shadow: 0 9px 24px rgba(34, 72, 55, .06);
}

.realtime-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.realtime-detail-head > div:first-child span {
    color: #5b7f6f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.realtime-detail-head h3 {
    margin: 5px 0 0;
    font-size: 20px;
    letter-spacing: -.025em;
}

.realtime-detail-head > div:last-child {
    display: grid;
    justify-items: end;
}

.realtime-detail-head > div:last-child b {
    color: #275d4a;
    font-size: 22px;
}

.realtime-detail-head > div:last-child small {
    color: #84908a;
    font-size: 9px;
}

.realtime-score-breakdown {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #e9f3ee;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
}

.realtime-score-breakdown span {
    color: #63736b;
    font-size: 10px;
}

.realtime-score-breakdown b {
    color: #315f4b;
}

.realtime-detail-sources {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.realtime-detail-sources > div {
    padding: 10px;
    border: 1px solid #e2e9e5;
    border-radius: 10px;
    background: #fff;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.realtime-detail-sources strong {
    color: #34463e;
    font-size: 12px;
}

.realtime-detail-sources time {
    overflow: hidden;
    color: #84908a;
    font-size: 10px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.realtime-keyword-detail > p {
    margin: 14px 0 0;
    color: #76837d;
    font-size: 11px;
}

@media (max-width: 760px) {
    .realtime-idea-controls {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .realtime-source-filters {
        width: 100%;
    }

    .realtime-sort-control {
        margin-left: 0;
    }

    .realtime-visible-count {
        margin-left: auto;
        align-self: center;
    }

    .realtime-keyword-select {
        padding: 13px 2px;
        grid-template-columns: 34px minmax(0, 1fr) 54px 20px;
        gap: 7px 9px;
    }

    .realtime-keyword-title {
        grid-column: 2;
    }

    .realtime-keyword-score {
        grid-column: 3;
    }

    .realtime-keyword-chevron {
        grid-column: 4;
    }

    .realtime-keyword-sources {
        grid-column: 2 / 5;
        justify-content: flex-start;
    }

    .realtime-keyword-detail {
        margin-left: 36px;
        padding: 16px;
    }

    .realtime-detail-sources {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .realtime-keyword-detail {
        margin-left: 0;
    }

    .realtime-detail-head h3 {
        font-size: 17px;
    }
}

/* Keyword analysis and related news */
.realtime-analysis {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #dce7e1;
}

.realtime-analysis-status {
    min-height: 58px;
    padding: 18px;
    border-radius: 11px;
    background: #edf4f0;
    color: #557064;
    display: grid;
    place-items: center;
    font-size: 12px;
    text-align: center;
}

.realtime-analysis[aria-busy="true"] .realtime-analysis-status::before {
    width: 18px;
    height: 18px;
    margin-bottom: 8px;
    border: 2px solid #bad0c5;
    border-top-color: #39705a;
    border-radius: 50%;
    content: "";
    animation: realtime-analysis-spin .7s linear infinite;
}

@keyframes realtime-analysis-spin {
    to { transform: rotate(360deg); }
}

.realtime-analysis-status.is-error,
.realtime-analysis-error {
    background: #fff0f0;
    color: #994444;
}

.realtime-analysis-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.realtime-analysis-label {
    color: #5b7f6f;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
}

.realtime-analysis-summary h4 {
    margin: 5px 0 0;
    font-size: 19px;
}

.realtime-analysis-actions {
    display: flex;
    gap: 6px;
}

.realtime-analysis-actions button,
.realtime-analysis-actions a,
.realtime-analysis-news-actions button,
.realtime-analysis-news-actions a {
    padding: 7px 9px;
    border: 1px solid #d5e1db;
    border-radius: 8px;
    background: #fff;
    color: #416657;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.realtime-analysis-intent {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(120px, .6fr) minmax(0, 1.4fr);
    gap: 8px;
}

.realtime-analysis-intent > div {
    padding: 12px;
    border: 1px solid #e0e8e4;
    border-radius: 10px;
    background: #fff;
    display: grid;
    gap: 5px;
}

.realtime-analysis-intent span {
    color: #829089;
    font-size: 9px;
    font-weight: 750;
}

.realtime-analysis-intent strong {
    color: #32463d;
    font-size: 12px;
    line-height: 1.5;
}

.realtime-analysis-section {
    margin-top: 17px;
}

.realtime-analysis-section h5 {
    margin: 0 0 9px;
    color: #33483f;
    font-size: 12px;
}

.realtime-related-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.realtime-related-keywords span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #e6f1eb;
    color: #376a54;
    font-size: 10px;
    font-weight: 750;
}

.realtime-direction-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 7px;
    list-style: none;
}

.realtime-direction-list li {
    position: relative;
    padding: 9px 11px 9px 30px;
    border-radius: 9px;
    background: #f4f7f5;
    color: #52625b;
    font-size: 11px;
    line-height: 1.5;
}

.realtime-direction-list li::before {
    position: absolute;
    left: 11px;
    color: #3d775e;
    content: "✓";
    font-weight: 900;
}

.realtime-analysis-cautions {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #ebd29a;
    border-radius: 10px;
    background: #fff9e8;
}

.realtime-analysis-cautions strong {
    color: #805e16;
    font-size: 11px;
}

.realtime-analysis-cautions p {
    margin: 5px 0 0;
    color: #806b3a;
    font-size: 10px;
    line-height: 1.5;
}

.realtime-analysis-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.realtime-analysis-news-head span {
    color: #47715f;
    font-size: 10px;
    font-weight: 800;
}

.realtime-analysis-news-list {
    display: grid;
    gap: 7px;
}

.realtime-analysis-news-item {
    padding: 12px;
    border: 1px solid #e1e7e4;
    border-radius: 10px;
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    opacity: .68;
}

.realtime-analysis-news-item.is-selected {
    border-color: #73a38e;
    background: #f2f9f5;
    opacity: 1;
    box-shadow: inset 3px 0 #3b765d;
}

.realtime-analysis-news-meta {
    color: #77847e;
    font-size: 9px;
}

.realtime-analysis-news-item h6 {
    margin: 5px 0 0;
    color: #2c3d35;
    font-size: 12px;
    line-height: 1.5;
}

.realtime-analysis-news-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.realtime-analysis-news-actions button[aria-pressed="true"] {
    border-color: #477b64;
    background: #477b64;
    color: #fff;
}

.realtime-analysis-empty,
.realtime-analysis-error {
    margin: 0;
    padding: 14px;
    border-radius: 9px;
    font-size: 11px;
    text-align: center;
}

.realtime-analysis-empty {
    background: #f3f6f4;
    color: #78847f;
}

@media (max-width: 620px) {
    .realtime-analysis-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .realtime-analysis-actions {
        width: 100%;
    }

    .realtime-analysis-actions > * {
        flex: 1;
        text-align: center;
    }

    .realtime-analysis-intent {
        grid-template-columns: 1fr;
    }

    .realtime-analysis-news-item {
        grid-template-columns: 1fr;
    }

    .realtime-analysis-news-actions {
        display: flex;
    }
}
