/* ── 颜色变量 ── */
:root {
    --bg-panel:   rgba(252, 252, 228, 0.82);
    --border:     rgba(200, 200, 140, 0.30);
    --text-main: #5a4a30;
    --text-muted: #7a7a5a;
    --link:       #6b6b30;
    --link-hover: #5a4a30;
    --link-visit: #7a6a40;
    /* 覆盖 Bootstrap 链接色 */
    --bs-link-color: #6b6b30;
    --bs-link-hover-color: #5a4a30;
}

html {
    font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 10px;
  }
}

body {
    font-family: sans-serif;
    background-image: url("/images/yumieko_bg.jpg");
    color: var(--text-main);
    line-height: 1.8;
    hyphens: auto;
    font-feature-settings: "palt";
    hanging-punctuation: first allow-end last;
    text-autospace: ideograph-alpha ideograph-numeric;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.avatar-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.avatar {
    max-width: 40% !important;
    height: auto !important;
    border-radius: 6px !important;
}

/* ── 导航栏 ── */
.navbar {
    background: var(--bg-panel) !important;
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
}
.navbar-brand {
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    font-weight: bold;
    color: var(--text-muted) !important;
}
.nav-title {
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    font-weight: bold;
    color: var(--text-muted) !important;
}
.navbar .nav-link {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    color: var(--text-muted) !important;
}
.navbar .nav-link:hover {
    color: var(--text-main) !important;
}

@media (max-width: 576px) {
    .navbar-brand {
	font-size: 2.0rem;
    }
    .nav-title {
	display:none;
    }
    .nav-bt {
	font-size: 2.0rem !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	font-weight: bold;
	color: var(--text-muted) !important;
    }
    .nav-bt:hover,
    .nav-bt:focus,
    .nav-bt:active,
    .nav-bt:focus-visible {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	font-weight: bold;
	color: var(--text-muted) !important;
    }
}

/* ── 主区域 ── */
.main {
    display: flex;
    flex: 1;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.25rem auto;
    width: 100%;
    max-width: 1140px;
    padding: 0 1rem;
}

/* ── 侧边栏 ── */
.sidebar {
    width: 120px;
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-btn {
    display: block;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.2s;
}
.sidebar-btn:hover {
    background: rgba(252, 252, 228, 0.96);
    color: var(--text-main);
}

.sidebar-right {
    width: 180px;
    flex-shrink: 0;
    top: 70px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-self: flex-start;
}
.sidebar-widget {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
}

.sidebar-widget-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.subscribe-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.subscribe-links a {
    text-decoration: none !important;
    color: var(--text-muted) !important;
}
.subscribe-links a:hover {
    color: var(--link) !important;
}
.banner-placeholder {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: rgba(200, 200, 140, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── 正文 ── */
.eko {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    min-width: 0;
}

/* ── Footer ── */
.footer {
    margin: 0;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
}

/* ── 链接 ── */
a {
    color: var(--link) !important;
    text-decoration-color: rgba(107, 107, 48, 0.35);
}
a:hover {
    color: var(--link-hover) !important;
    text-decoration-color: rgba(58, 58, 24, 0.55);
}
a:visited {
    color: var(--link-visit) !important;
    text-decoration-color: rgba(107, 107, 48, 0.35);
}

.post-list h1{
    margin-bottom: 1.5rem;
    color: var(--text-main) !important;
}

.post-card {
    
}

.post-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.post-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-summary {    
    color: var(--text-muted);
    font-size: 1.0rem;
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;    
}
.btn {
    font-size: 0.85rem;
    padding: 0.3rem 0.9rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--text-muted) !important;
    text-decoration: none !important;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}
.btn:hover {
    background: rgba(252, 252, 228, 0.96);
    color: var(--text-main) !important;
}
.btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: none;
}

.post-title {
    font-size: 2.0rem;
    font-weight: normal;
    margin-bottom: 0.75rem;
    color: var(--text-main) !important;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.0rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-body {
    font-size: 1.05rem;
    color: var(--text-main) !important;
}

.post-body p,
.post-body li,
.post-body blockquote {
    color: var(--text-main) !important;
}

.post-body h1 {
    font-size: 1.9rem;
    color: var(--text-main) !important;
}

.post-body h2 {
    font-size: 1.7rem;
    color: var(--text-main) !important;
}

.post-body h3 {
    font-size: 1.5rem;
    color: var(--text-main) !important;
}

.post-body h4 {
    font-size: 1.3rem;
    color: var(--text-main) !important;
}

.post-body h5 {
    font-size: 1.1rem;
    color: var(--text-main) !important;
}

.post-author {
    color: var(--text-muted);
}

.post-meta-sep {
    color: var(--border);
}

.post-date {
    color: var(--text-muted);
}

.post-summary {
    font-size: 1.0rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.yumieko-svg {
    width: 100px;
    height: 50px;
}

.post-image {
  max-height: 80vh;
  width: auto;
}

@media (max-width: 575.98px) {
  .sidebar-right {
    display: none;
  }
}

/* ── Offcanvas 移动菜单 ── */
.offcanvas {
    background: var(--bg-panel) !important;
    backdrop-filter: blur(6px);
    border-left: 1px solid var(--border) !important;
    color: var(--text-main);
    width: 50% !important;
    max-width: 280px !important;
}

.offcanvas-header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    position: relative;
}

.offcanvas-title {
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.btn-close {
    filter: opacity(0.4) sepia(1) hue-rotate(10deg);
}
.btn-close:focus {
    box-shadow: none !important;
    outline: none !important;
}

.offcanvas-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* 每个分组 */
.menu-section-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.menu-section-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-section-links a {
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    padding: 0.2rem 0;
    transition: color 0.15s;
}

.menu-section-links a:hover {
    color: var(--text-main) !important;
}

.offcanvas-center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    pointer-events: none;
}

/* ── 隐藏 Checkbox 控制器 ── */
#menuToggle {
    display: none;
}

/* ── 遮罩层 ── */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

/* ── 移动菜单 ── */
/* 替换原有的 .offcanvas */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 50%;
    max-width: 280px;
    
    /* 核心动画逻辑：默认隐藏在右侧屏幕外 */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    z-index: 1050;
    
    /* 保留你的视觉风格 */
    background: var(--bg-panel) !important;
    backdrop-filter: blur(6px);
    border-left: 1px solid var(--border) !important;
    color: var(--text-main);
}

#menuToggle:checked ~ .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}

/* ── 菜单头部 ── */
.mobile-menu-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* 核心魔法：Checkbox 选中时展开菜单 */
#menuToggle:checked ~ .mobile-menu {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-title {
    font-size: 1.0rem;
    letter-spacing: 0.1em;
    font-weight: bold;
    color: var(--text-main);
    margin: 0;
}

.mobile-menu-center-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    color: var(--text-main);
    pointer-events: none;
}

/* 关闭按钮现在作为 label 使用 */
.mobile-menu-close {
    cursor: pointer;
    font-size: 1.7rem;
    font-weight: bold;
    color: var(--text-main);
    /* 模拟 btn-close 的外观，你可以根据需要调整 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.mobile-menu-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    height: calc(100% - 60px); /* 减去 header 高度 */
}
