/* pico調整 */
:root {
    --pico-font-size: 98%;
    --pico-line-height: 1.5;
    /* コンテナの最大幅調整 */
    --pico-width-max: 1028px;
    /* 各ブレイクポイントでのコンテ幅 (max-width) */
    --pico-width-sm: 576px;
    --pico-width-md: 768px;
    --pico-width-lg: 1024px;
    --pico-width-xl: 1024px;
    --pico-width-xxl: 1024px;
    /* 余白の調整 */
    --pico-spacing: 1rem;
    --pico-block-spacing-vertical: 2rem;
    --pico-block-spacing-horizontal: var(--pico-spacing);
}

/* Container Overrides using variables */
.container {
    max-width: var(--pico-width-max);
}

@media (min-width: 576px) {
    .container {
        max-width: var(--pico-width-sm);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: var(--pico-width-md);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: var(--pico-width-lg);
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: var(--pico-width-lg);
        padding-left: 0;
        padding-right: 0;
    }
}


/* Header Styles */
#main-header {
    margin-bottom: 1rem;
    background-color: #ffffff;
    color: #11191f;

    padding: 1rem 0;
}

#main-header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo-link {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 2rem;
    width: auto;
}

#main-header a {
    color: #11191f;
    text-decoration: none;
}

#main-header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

#main-header nav ul li {
    margin: 0;
}

#mobile-menu-toggle {
    display: none;
}

.mobile-only {
    display: none !important;
}

.pc-only {
    display: block;
}


/* Breadcrumbs */
.breadcrumb-wrapper {
    margin-bottom: 2rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.breadcrumb-container {
    font-size: 0.85rem;
}

.breadcrumb-container ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Picoのデフォルトスタイルを完全にリセット */
[aria-label="breadcrumb"] ul li {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    flex: none !important;
}

[aria-label="breadcrumb"] ul li::after {
    display: none !important;
}

.breadcrumb-container li {
    display: flex;
    align-items: center;
}

/* 2番目以降のliの前にのみ仕切りを入れる */
.breadcrumb-container li+li::before {
    content: ">";
    margin: 0 0.5rem;
    /* ここで記号前後の余白を調整 */
    color: var(--pico-muted-color);
}

.breadcrumb-container a {
    text-decoration: none;
    color: var(--pico-primary);
}

.breadcrumb-container li[aria-current="page"] {
    color: var(--pico-muted-color);
    max-width: 50em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
}



/* Article Card Image (16:9) */
.article-card-image {
    margin: 0 0 0.5rem 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--pico-muted-border-color);
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Default: List view (horizontal) */
main.container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* List View Article Layout using class */
#article-container article {
    padding: 0;
    margin-bottom: 1rem;
}

.article-link {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
}

.article-link:hover {
    text-decoration: none;
    background-color: var(--pico-card-background-color);
    /* optional hover effect */
}

/* Adjust nested elements within .article-link */
.article-link .article-card-image {
    width: 140px;
    flex-shrink: 0;
    margin: 0;
}

.article-link .article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-link .article-content h3 {
    margin: 0;
    font-size: 1.1em;
}

.article-link .article-content small {
    display: block;
    margin-top: 0.5rem;
    color: var(--pico-muted-color);
}

/* Article Single Page Styles */
.article-single {
    padding: var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);
    background: none;
    border: none;
    box-shadow: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--pico-muted-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.back-link:hover {
    color: var(--pico-primary);
    border-color: var(--pico-primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
}

/* Article Navigation Row (Back & Bookmark) */
.article-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.article-nav-row .back-link {
    margin-bottom: 0;
}

#bookmark-btn {
    margin-left: auto;
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-bottom: 0;
    transition: all 0.2s ease;
}

#bookmark-btn.warning {
    background-color: #f59f00 !important;
    border-color: #f59f00 !important;
    color: #fff !important;
}

#bookmark-btn.outline {
    background-color: transparent !important;
    border-color: #f59f00 !important;
    color: #f59f00 !important;
}

.article-single hgroup h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.article-single hgroup p small a {
    text-decoration: none;
    margin-right: 0.2rem;
}

.article-single hgroup p small a:hover {
    text-decoration: underline;
}

#summary-content {
    line-height: 1.8;
    max-width:100%;
    overflow:hidden;
}

.article-footer {
    background: none;
    border: none;
    padding-top: 2rem;
}

.footer-url {
    word-break: break-all;
    display: inline-block;
}

/* Article Content Elements */
.table-wrapper {
    margin: 2.5rem 0 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
}

.table-wrapper table {
    margin-bottom: 0;
    width: 100%;
}

.table-wrapper table th {
    min-width: 8rem;
}

.table-wrapper table td {
    vertical-align: top;
}

.article-main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.article-media-iframe {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: none;
    width: 100%;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Search Widget Styles */
.search-form-inner {
    display: flex;
    gap: 0;
    width: 100%;
}

.search-form-inner input[type="search"] {
    margin-bottom: 0 !important;
    border-radius: 0;
    flex: 1;
}

.search-form-inner button {
    width: auto;
    margin-bottom: 0 !important;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    white-space: nowrap;
}

/* ========== Sidebar Styles ========== */
.layout-wrapper {
    display: flex;
    gap: 2rem;
}

.layout-wrapper main {
    flex: 1;
    min-width: 0;
}

.sidebar-pc {
    width: 300px;
    flex-shrink: 0;
}

.sidebar .widget {
    margin-bottom: 2.5rem;
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

@media (min-width: 769px) {
    .sidebar-mobile {
        display: none;
    }
}

/* Widget Shared Styles */
.widget-header {
    margin-bottom: 0.5rem;
}

.widget-header h4 {
    margin: 0;
    font-size: 14px;
    color: #5d6b77;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.widget-header h4 i {
    font-size: 1.1em;
}

.widget-header h4 small {
    font-size: 0.6em;
    font-weight: normal;
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: auto;
    /* Push to the right if possible */
}

.widget-tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.widget-tag-list li {
    margin: 0;
    padding: 1px 0;
}


.empty-message {
    font-size: 0.8em;
    color: var(--pico-muted-color);
    list-style: none;
}

/* Widget Category Tag */
.widget-category-tag {
    font-size: 0.8em;
    text-decoration: none;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: inline-block;
    transition: background-color 0.2s;
    color: var(--pico-color);
}

.widget-category-tag:hover {
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    text-decoration: none;
}

/* Widget Source Tag */
.widget-source-list {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}



.widget-source-tag {
    font-size: 0.8em;
    text-decoration: none;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s;
    color: var(--pico-color);
}

.widget-source-tag:hover {
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    border-color: var(--pico-primary-background);
    text-decoration: none;
}

.widget-source-tag.secondary {
    border-left: 3px solid var(--pico-color-jade);
}

.sidebar-tab {
    margin-right: 0.5rem;
}

.sidebar-tab.active {
    background-color: var(--pico-primary);
    color: white;
}

/* Widget Ranking Styles */
.widget-article-list {
    list-style: none;
    padding: 0 !important;
    margin: 0 0 1rem 0 !important;
}

.widget-article-list li {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding-bottom: 0.75rem;
}

.widget-article-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-article-list a {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 0.75rem;
}

.widget-article-list a:hover {
    text-decoration: none;
}

.widget-article-item-image {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 50px;
}

.widget-article-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.widget-article-item-image .no-image {
    width: 100%;
    height: 100%;
    background: var(--pico-card-background-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-article-item-image .rank-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    font-size: 0.7em;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.widget-article-item-content {
    flex: 1;
    min-width: 0;
}

.widget-article-item-content h5 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* ========== Footer Styles ========== */
footer.container {
    padding-top: 3rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
}

.footer-group {
    margin-bottom: 1.5rem;
}

#footer-upper {}

#footer-middle {
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    background-color: #1a3043;
}
#footer-middle a{
    color: #fff;
    text-decoration: none;
}
#footer-middle a:hover{
    text-decoration: underline;
}
#footer-lower {
    text-align: center;
}

#footer-lower ul {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

#footer-lower ul li {
    list-style: none;
}

#footer-lower ul li:after {
    content: "|";
    padding-left: 8px;
}

#footer-lower ul li:last-child:after {
    content: "";
}

#footer-lower ul a {
    text-decoration: none;
    color: #fff;
}

#footer-credit {
    text-align: center;
}

/* Article Source Info */
.article-source-info {
    margin-bottom: 1rem;
}

.article-source-info>strong {
    font-size: 1.2rem;
}

.article-source-info strong {
    color: var(--pico-muted-color);
}

.article-source-info ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.article-source-info ul li {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
}

.article-source-info ul li a {
    word-break: break-all;
}

/* ========== My Page Styles ========== */
.mypage-introBox {
    padding: 1.6rem;
    border: 2px solid var(--pico-color);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

#mypage-settings {
    margin-bottom: 2rem;
    border: 1px solid var(--pico-muted-border-color);
    padding: 1.5rem;
    border-radius: var(--pico-border-radius);
    background-color: var(--pico-card-background-color);
}

#mypage-settings header {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding-bottom: 0.5rem;
    margin-top: -0.5rem;
}

.mypage-stats-grid {
    align-items: end;
}

.mypage-status-value {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#limit-select {
    margin-bottom: 0.5rem;
    height: 2.2rem;
    padding: 0.2rem 0.5rem;
}

.mypage-actions {
    text-align: right;
}

#btn-delete-all {
    background-color: transparent;
    border-color: #d32f2f;
    color: #d32f2f;
    width: auto;
    display: inline-block;
    padding: 0.4rem 1rem;
    transition: all 0.2s;
}

#btn-delete-all:hover {
    background-color: #d32f2f;
    color: #fff;
    text-decoration: none;
}

/* Individual Delete Button */
.btn-sf-delete {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    width: auto;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Widget My Page Button */
.mypage-widget-container {
    text-align: center;
    padding: 1rem;
    background: var(--pico-card-background-color, #1e293b);
    border-radius: 8px;
    border: 1px solid var(--pico-card-border-color, #334155);
}

.mypage-button {
    display: inline-block;
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: #f59f00;
    color: #fff !important;
    border: 1px solid #f59f00;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.mypage-button:hover {
    background-color: transparent;
    color: #f59f00 !important;
}

.mypage-desc {
    font-size: 0.8rem;
    color: var(--pico-muted-color, #94a3b8);
    margin: 0;
}

/* ========== RSS Widget（PC用・style_sp.css でスマホ用を上書き） ========== */
.widget-rss-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.widget-rss-list__label {
    grid-column: 1 / -1;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.widget-rss-list__loading,
.widget-rss-list__error,
.widget-rss-list__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    color: var(--pico-muted-color);
}

.widget-rss-list__item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.widget-rss-list__item:hover {
    border-color: var(--pico-primary);
    transform: translateY(-2px);
}

.widget-rss-list__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.widget-rss-list__title {
    padding: 0.75rem;
    flex-grow: 1;
    flex-shrink: 1;
}

.widget-rss-list__title-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
}

/* その他 */
.anyAd-trvd{
    margin-top:2rem;
    margin-bottom: 2rem;
}
.ats-glia-wrapper{
    max-width:100%;
}