/* pico調整 (Shared base) */
:root {
    --pico-font-size: 90%;
    --pico-line-height: 1.5;
    /* コンチE��の最大幁E��整 */
    --pico-width-max: 768px;
    /* 吁E��レイクポイントでのコンチE��E(max-width) */
    --pico-width-sm: 576px;
    --pico-width-md: 768px;
    --pico-width-lg: 768px;
    --pico-width-xl: 768px;
    --pico-width-xxl: 768px;
    /* 余白の調整 */
    --pico-spacing: 1rem;
    --pico-block-spacing-vertical: 2rem;
    --pico-block-spacing-horizontal: var(--pico-spacing);
}

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

/* Base Header */
#main-header {
    background-color: #ffffff;
    color: #11191f;
    padding: 1rem 0;
}

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

/* Mobile Header Layout */
#main-header .header-container {
    display: flex;
    justify-content: center;
    /* Center logo */
    align-items: center;
    position: relative;
}

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

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

#mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 8px;
    top: 8px;
    background: #ffffff;
    border: none;
    border-radius: 4px;
    color: var(--pico-muted-border-color);
    padding: 0;
    width: 40px;
    height: 40px;
    z-index: 1100;
    /* Sidebarより手前か、Overlayの丁E*/
    cursor: pointer;
}

#mobile-menu-toggle i {
    font-size: 28px;
}

#header-nav {
    display: none;
    /* Hide global menu on mobile */
}

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

.mobile-only {
    display: block;
}

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

.breadcrumb-container {
    font-size: 12px;
    /* Fixed 12px for SP */
}

.breadcrumb-container ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[aria-label="breadcrumb"] ul li {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto;
    /* Don't shrink parents */
    display: flex;
    align-items: center;
}

[aria-label="breadcrumb"] ul li[aria-current="page"] {
    flex: 0 1 auto;
    /* Allow current page to shrink */
    min-width: 0;
    overflow: hidden;
}

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

.breadcrumb-container li:not(:first-child)::before {
    content: ">";
    margin: 0 0.2rem;
    color: var(--pico-muted-color);
    display: inline-block;
}

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

.breadcrumb-container li[aria-current="page"] {
    color: var(--pico-muted-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Article List */
main.container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#article-container article {
    padding: 0;
    margin-bottom: .6rem;
}

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

.article-link .article-card-image {
    width: 80px;
    /* Fixed 100px for SP */
    flex-shrink: 0;
    margin: 0;
    aspect-ratio: 10 /11;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--pico-muted-border-color);
}

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

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

.article-link .article-content h3 {
    margin: 0;
    font-size: 13px !important;
    line-height: 1.2;
    /* Fixed 14px for SP */
}

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

/* Article Single */
.article-single {
    padding: 1rem;
    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;
}

/* 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.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

#summary-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

#summary-content .table-wrapper {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 2px solid var(--pico-table-border-color);
    border-radius: 8px;
}

#summary-content table {
    font-size: 12px;
}

#summary-content table td {
    padding: 8px;
}

#summary-content table td:first-child {
    padding-right: 0;
}

#summary-content table th {
    min-width: 5rem;
}

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

/* Sidebar (Mobile Slide-in) */
.layout-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
}

.sidebar-pc {
    display: none;
    /* Hide PC sidebar */
}

.sidebar-mobile {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background-color: var(--pico-background-color);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 2rem 8px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.sidebar-mobile.active {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Widget Styles (Used in Mobile Sidebar) */
.sidebar .widget {
    margin-bottom: 2.5rem;
}

.widget-header h4 {
    margin: 0;
    font-size: 16px;
    margin-bottom: 8px;
    color: #5d6b77;
    font-weight: 600;
}

.widget-article-list {
    list-style: none;
    padding: 0 !important;
    margin: 0 0 1rem 0 !important;
}

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

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

.widget-article-item-image {
    width: 40px;
    height: 60px;
    flex-shrink: 0;
}

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

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

.rank-badge {
    display: none;
}

/* Search Widget */
.search-form-inner {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-form-inner input[type="search"] {
    margin-bottom: 0 !important;
    flex: 1;
    height: 42px;
    padding: 0 1rem;
}

.search-form-inner button {
    width: auto !important;
    height: 42px;
    padding: 0 1rem;
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Widget (Mobile Button Style) */
.widget-categories .widget-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
}

.widget-categories .widget-tag-list li {
    width: calc(50% - 0.25rem);
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.widget-category-tag {
    display: block;
    text-align: center;
    padding: 0.6rem 0.5rem;
    background-color: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    color: var(--pico-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s, border-color 0.2s;
    font-weight: 500;
}

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

/* Source Widget (Mobile Button Style) */
.widget-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget-source-tag {
    display: inline-block;
    padding: 0.6rem 0.8rem;
    background-color: #fff;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    color: var(--pico-color);
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.2s, border-color 0.2s;
    font-weight: 500;
}

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

/* widget-html */
.widget-html ul {
    padding: 0;
}

.widget-html ul li {
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.widget-html ul a {
    color: #fff;
    text-decoration-line: none;
}

/* ========== Footer Styles ========== */
footer.container {
    width:100vw;
    margin-top:3rem;
    padding: 1rem;
    border-top:4px solid var(--pico-muted-border-color);
    background-color: #111113;
}

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

#footer-upper {
    
}

#footer-middle ,
#footer-lower {padding:1rem 0 0;}


#footer-credit {
    margin-top: 1.5rem;
    opacity: 0.7;
    text-align: center;
}

/* Article Source Info */
.article-footer {
    padding: 1rem;
    background: none;
    border: none;
}

.article-source-info {}

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

.article-source-info ul strong {
    font-size: 0.85rem;
    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.8rem;
    color: var(--pico-muted-color);
    line-height: 1.4;
}

.article-source-info ul li a {
    display: block;
    margin-top: 0.2rem;
    word-break: break-all;
}

/* 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（スマホ: 縦並び・画像左・タイトル右） ========== */
.widget-rss-list {
    display: flex;
    flex-direction: column;
}

.widget-rss-list__label {
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 0.8rem;
    margin-bottom: 0.25rem;
}

.widget-rss-list__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration:none;
    border-bottom:1px solid var(--pico-muted-border-color);
    padding:0.75rem 0;
}

.widget-rss-list__item img {
    width: 100px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

.widget-rss-list__title {
    flex: 1;
    min-width: 0; /* flex子の幅を正しく縮め、折り返し行の左揃えを揃える */
    padding: 0 0 0 0.5rem;
    text-align: left;
    -webkit-line-clamp: 2;
    font-size: .9em;;
}