:root {
    --yrm-bg: #f4f0e9;
    --yrm-ink: #1f1a16;
    --yrm-surface: rgba(255, 252, 246, 0.92);
    --yrm-line: #d7cdbf;
    --yrm-accent: #bf3f2f;
    --yrm-accent-strong: #942d21;
    --yrm-muted: #6e6258;
    --yrm-good: #0f7a57;
    --yrm-shadow: 0 12px 40px rgba(31, 26, 22, 0.09);
}

.yahoo-realtime-media-page {
    background:
        radial-gradient(circle at 10% 0%, rgba(191, 63, 47, 0.08), transparent 42%),
        radial-gradient(circle at 90% 20%, rgba(36, 72, 128, 0.08), transparent 46%),
        var(--yrm-bg);
    color: var(--yrm-ink);
    min-height: 100vh;
}

.yrm-shell {
    max-width: 1440px;
}

.yrm-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.yrm-hero__content,
.yrm-meta-card,
.yrm-panel,
.yrm-card {
    background: var(--yrm-surface);
    border: 1px solid var(--yrm-line);
    box-shadow: var(--yrm-shadow);
}

.yrm-hero__content {
    padding: 1rem 1.1rem;
    border-radius: 18px;
}

.yrm-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--yrm-muted);
    font-weight: 700;
}

.yrm-title {
    font-family: "BIZ UDPGothic", "Hiragino Sans", sans-serif;
    font-weight: 700;
    font-size: clamp(1.35rem, 2.2vw, 2.1rem);
}

.yrm-subtitle {
    color: var(--yrm-muted);
    line-height: 1.5;
}

.yrm-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.yrm-meta-card {
    border-radius: 16px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
}

.yrm-meta-card__label {
    font-size: 0.8rem;
    color: var(--yrm-muted);
}

.yrm-meta-card__value {
    margin-top: 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.yrm-panel {
    border-radius: 18px;
    padding: 0.9rem 1rem 1rem;
    min-width: 0;
}

.yrm-panel__header,
.yrm-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.yrm-panel__title {
    font-size: 1.05rem;
    font-weight: 700;
}

.yrm-panel__actions {
    display: flex;
    gap: 0.5rem;
}

.yrm-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    min-width: 0;
}

.yrm-filter-block {
    padding: 0.75rem;
    border: 1px solid var(--yrm-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    min-width: 0;
}

.yrm-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.yrm-select,
.yrm-filter-block .form-control {
    border-color: #cabfb0;
}

.yrm-chip-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.yrm-chip-button,
.yrm-toggle-button,
.yrm-reset-button,
.yrm-inline-button,
.yrm-load-more-button {
    border: 1px solid #b9ad9c;
    border-radius: 999px;
    background: #fffdfa;
    color: var(--yrm-ink);
    padding: 0.38rem 0.7rem;
    font-size: 0.85rem;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.yrm-chip-button:hover,
.yrm-toggle-button:hover,
.yrm-reset-button:hover,
.yrm-inline-button:hover,
.yrm-load-more-button:hover {
    background: #fff4ee;
    border-color: var(--yrm-accent);
}

.yrm-chip-button:active,
.yrm-toggle-button:active,
.yrm-reset-button:active,
.yrm-inline-button:active,
.yrm-load-more-button:active {
    transform: translateY(1px);
}

.yrm-chip-button.is-selected,
.yrm-toggle-button.is-selected {
    background: var(--yrm-accent);
    border-color: var(--yrm-accent);
    color: #fff;
}

.yrm-chip-button:focus-visible,
.yrm-toggle-button:focus-visible,
.yrm-reset-button:focus-visible,
.yrm-inline-button:focus-visible,
.yrm-load-more-button:focus-visible,
.yrm-select:focus-visible,
.yrm-filter-block .form-control:focus-visible {
    outline: 3px solid rgba(191, 63, 47, 0.25);
    outline-offset: 2px;
}

.yrm-chip-button[disabled],
.yrm-toggle-button[disabled],
.yrm-reset-button[disabled],
.yrm-inline-button[disabled],
.yrm-load-more-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.yrm-chip-button--suggestion small {
    margin-left: 0.35rem;
    opacity: 0.8;
}

.yrm-chip-button--selected-tag {
    font-weight: 600;
}

.yrm-feed-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.95rem;
}

@media (min-width: 1200px) {
    .yrm-feed-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (min-width: 1600px) {
    .yrm-feed-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.yrm-card {
    border-radius: 16px;
    overflow: clip;
}

.yrm-card__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 0.95rem 0.75rem;
    border-bottom: 1px solid rgba(215, 205, 191, 0.75);
}

.yrm-card__author-main {
    font-weight: 700;
}

.yrm-card__author-sub {
    font-size: 0.82rem;
    color: var(--yrm-muted);
}

.yrm-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.yrm-kind-badge {
    font-size: 0.76rem;
    border: 1px solid #cabfb0;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    background: #fff8f4;
    text-transform: uppercase;
}

.yrm-open-link {
    color: var(--yrm-accent-strong);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
}

.yrm-open-link:hover {
    text-decoration: underline;
}

.yrm-thumb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.75rem 0.95rem 0;
}

.yrm-thumb-grid--1 {
    grid-template-columns: 1fr;
}

.yrm-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ece6dc;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(215, 205, 191, 0.8);
}

.yrm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yrm-thumb-badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
    border-radius: 999px;
    background: rgba(16, 15, 14, 0.78);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
}

.yrm-thumb-placeholder {
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px dashed var(--yrm-line);
    text-align: center;
    color: var(--yrm-muted);
    background: rgba(255, 255, 255, 0.6);
}

.yrm-card__body {
    padding: 0.7rem 0.95rem 0.9rem;
}

.yrm-card__text {
    margin-bottom: 0.55rem;
    color: #2a241f;
    line-height: 1.5;
    word-break: break-word;
}

.yrm-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.yrm-tag-chip {
    border-radius: 999px;
    background: #efe7db;
    border: 1px solid #d9ceb9;
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
}

.yrm-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.yrm-metric {
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    background: #fff;
    border: 1px solid #ddd0bc;
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}

.yrm-metric--score {
    border-color: rgba(15, 122, 87, 0.35);
    color: var(--yrm-good);
    background: rgba(15, 122, 87, 0.08);
}

.yrm-card__embed-controls {
    margin-top: 0.6rem;
}

.yrm-inline-button {
    font-size: 0.8rem;
    padding-inline: 0.65rem;
}

.yrm-embed-shell {
    padding: 0 0.95rem 0.95rem;
}

.yrm-embed-placeholder {
    border-radius: 12px;
    border: 1px dashed var(--yrm-line);
    color: var(--yrm-muted);
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.55);
}

.yrm-embed {
    margin-top: 0.5rem;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.yrm-embed blockquote.twitter-tweet {
    max-width: 100% !important;
    width: 100% !important;
}

.yrm-embed iframe {
    max-width: 100% !important;
}

.yrm-embed .twitter-tweet,
.yrm-embed .twitter-tweet-rendered {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

.yrm-feed-section {
    padding-bottom: 2rem;
}

.yrm-loading,
.yrm-exhausted {
    color: var(--yrm-muted);
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.yrm-load-more-button {
    width: 100%;
    padding-block: 0.65rem;
    font-weight: 700;
    background: #fff;
}

.yrm-status-text {
    color: var(--yrm-muted);
    font-size: 0.85rem;
}

.yrm-empty-state {
    border: 1px dashed var(--yrm-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    padding: 1rem;
    color: var(--yrm-muted);
    text-align: center;
}

.yrm-scroll-sentinel {
    width: 100%;
    height: 1px;
}

@media (max-width: 991.98px) {
    .yrm-hero {
        grid-template-columns: 1fr;
    }
    .yrm-hero__meta {
        grid-template-columns: 1fr 1fr;
    }
    .yrm-filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .yrm-shell {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }
    .yrm-panel {
        padding: 0.7rem 0.75rem;
        position: sticky;
        top: 0.25rem;
        z-index: 2;
        backdrop-filter: blur(8px);
    }
    .yrm-panel__header,
    .yrm-feed-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .yrm-panel__actions {
        width: 100%;
    }
    .yrm-toggle-button,
    .yrm-reset-button {
        flex: 1;
    }
    .yrm-chip-row {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
    }
    .yrm-chip-row .yrm-chip-button {
        white-space: nowrap;
    }
    .yrm-card__head {
        flex-direction: column;
        align-items: flex-start;
    }
    .yrm-card__actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yrm-chip-button,
    .yrm-toggle-button,
    .yrm-reset-button,
    .yrm-inline-button,
    .yrm-load-more-button {
        transition: none;
    }
}
