/* ============================================================
   REDLAND 纪念馆 · 阶段 2 / 3 模块样式
   阶段 2：影像馆（照片画廊 / 灯箱 / 视频专区）/ 故事集 / 后台表单 / 分页
   阶段 3：留言墙（表单 / 卡片流 / 点赞 / 随机抽取）/ 投稿 / 验证码 / 后台审核
   依赖 redland.css 的设计令牌（--rl-red / --rl-yellow 等）
   ============================================================ */

/* ---------- 1. 页面通用 ---------- */
.rl-page {
    padding: 48px 0 72px;
    flex: 1;
}

.rl-page-header {
    text-align: center;
    margin-bottom: 48px;
}

.rl-page-kicker {
    font-family: var(--rl-font-pixel);
    font-size: 11px;
    color: var(--rl-yellow);
    letter-spacing: 2px;
    margin: 0 0 14px;
}

.rl-page-title {
    font-size: clamp(28px, 5vw, 40px);
    color: var(--rl-white);
    letter-spacing: 8px;
    margin: 0;
    font-weight: 700;
    text-shadow: 3px 3px 0 rgba(168, 32, 32, 0.55);
}

.rl-page-desc {
    color: rgba(232, 232, 232, 0.75);
    font-size: 14px;
    line-height: 2;
    max-width: 620px;
    margin: 0 auto;
}

.rl-page-meta {
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 209, 69, 0.65);
    letter-spacing: 2px;
}

.rl-block {
    margin-bottom: 72px;
}

.rl-block:last-child {
    margin-bottom: 0;
}

.rl-block-title {
    font-size: 20px;
    color: var(--rl-white);
    letter-spacing: 3px;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 标题前的像素方块 */
.rl-block-title::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--rl-yellow);
    box-shadow: 0 0 0 2px var(--rl-red-dark);
    flex-shrink: 0;
}

.rl-block-note {
    font-size: 13px;
    color: rgba(232, 232, 232, 0.45);
    margin: 0 0 22px;
}

.rl-back-link {
    display: inline-block;
    font-size: 13px;
    color: var(--rl-yellow);
    text-decoration: none;
    letter-spacing: 1px;
    margin-bottom: 24px;
    transition: color 0.15s ease;
}

.rl-back-link:hover {
    color: var(--rl-white);
}

/* ---------- 2. 标签筛选条 ---------- */
.rl-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.rl-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    background: rgba(51, 51, 51, 0.6);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    color: var(--rl-text);
    font-family: var(--rl-font);
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    /* 2026-10-19：分类筛选改为服务端处理，TAG 由 <button> 变为 <a>，需去掉链接下划线 */
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.rl-filter-btn:hover {
    border-color: var(--rl-red);
    color: var(--rl-white);
}

.rl-filter-btn.is-active {
    background: var(--rl-red);
    border-color: var(--rl-red-dark);
    color: var(--rl-white);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--rl-yellow);
}

.rl-filter-count {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: var(--rl-radius-sm);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(232, 232, 232, 0.6);
}

.rl-filter-btn.is-active .rl-filter-count {
    color: var(--rl-yellow);
}

/* ---------- 3. 照片画廊网格 ---------- */
.rl-gallery-grid {
    column-count: 2;
    column-gap: 12px;
}

@media (min-width: 560px) {
    .rl-gallery-grid { column-count: 3; column-gap: 14px; }
}

@media (min-width: 900px) {
    .rl-gallery-grid { column-count: 4; column-gap: 16px; }
}

.rl-gallery-item {
    position: relative;
    margin: 0 0 12px;
    width: 100%;
    display: block;
    break-inside: avoid;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid var(--rl-card-border);
    border-radius: var(--rl-radius);
    cursor: zoom-in;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rl-gallery-item:hover,
.rl-gallery-item:focus-visible {
    border-color: var(--rl-card-border-hover);
    box-shadow: 0 0 14px rgba(168, 32, 32, 0.45);
    outline: none;
}

.rl-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.rl-gallery-item:hover img {
    transform: scale(1.05);
}

/* 图片 hover 红色高光叠加层 */
.rl-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 60% at 50% 40%, rgba(168, 32, 32, 0.22), transparent 75%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.rl-gallery-item:hover::after {
    opacity: 1;
}

.rl-gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 22px 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.rl-gallery-item:hover .rl-gallery-caption,
.rl-gallery-item:focus-visible .rl-gallery-caption {
    opacity: 1;
    transform: none;
}

/* 触摸设备无 hover：说明信息常显 */
@media (hover: none) {
    .rl-gallery-caption {
        opacity: 1;
        transform: none;
    }
}

.rl-gallery-cat {
    font-size: 10px;
    color: var(--rl-yellow);
    letter-spacing: 1px;
}

.rl-gallery-title {
    font-size: 13px;
    color: var(--rl-white);
    font-weight: 700;
}

.rl-gallery-credit {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.6);
}

.rl-gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 32, 32, 0.92);
    border: 1px solid var(--rl-yellow);
    border-radius: var(--rl-radius);
    color: var(--rl-white);
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.rl-gallery-item:hover .rl-gallery-zoom,
.rl-gallery-item:focus-visible .rl-gallery-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rl-gallery-empty {
    text-align: center;
    color: rgba(232, 232, 232, 0.45);
    font-size: 13px;
    padding: 28px 0;
}

/* ---------- 4. 照片灯箱 ---------- */
.rl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.92);
}

.rl-lightbox[hidden],
.rl-modal[hidden] {
    display: none;
}

.rl-lightbox-figure {
    margin: 0;
    max-width: min(1000px, 92vw);
    text-align: center;
}

.rl-lightbox-img {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border: 1px solid rgba(168, 32, 32, 0.4);
    border-radius: var(--rl-radius);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    background: #0b0b0b;
}

.rl-lightbox-caption {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rl-lightbox-title {
    font-size: 15px;
    color: var(--rl-white);
    font-weight: 700;
    letter-spacing: 1px;
}

.rl-lightbox-credit {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.6);
}

.rl-lightbox-count {
    font-size: 12px;
    color: var(--rl-yellow);
    margin-top: 4px;
    font-family: var(--rl-font-pixel);
}

.rl-lightbox-close,
.rl-lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 18, 0.85);
    border: 1px solid var(--rl-red);
    border-radius: var(--rl-radius);
    color: var(--rl-white);
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    font-family: var(--rl-font);
}

.rl-lightbox-close:hover,
.rl-lightbox-nav:hover {
    background: var(--rl-red);
    box-shadow: inset 0 0 0 1px var(--rl-yellow);
}

.rl-lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
}

.rl-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 56px;
    font-size: 30px;
    line-height: 1;
}

.rl-lightbox-prev {
    left: 16px;
}

.rl-lightbox-next {
    right: 16px;
}

/* 灯箱打开动画（淡入 + 轻微放大） */
.rl-lightbox {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rl-lightbox.is-open {
    opacity: 1;
}

.rl-lightbox-figure {
    transform: scale(0.96);
    transition: transform 0.28s ease;
}

.rl-lightbox.is-open .rl-lightbox-figure {
    transform: scale(1);
}

/* 图片禁止拖拽出幽灵图；横向手势交给灯箱处理（配合 JS swipe） */
.rl-lightbox-img {
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y;
}

/* 移动端底部工具栏（默认隐藏，仅窄屏显示，替代两侧箭头） */
.rl-lightbox-toolbar {
    display: none;
}

/* ---------- 5. 视频专区 ---------- */
.rl-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.rl-video-card {
    background: var(--rl-card-bg);
    border: 1px solid var(--rl-card-border);
    border-radius: var(--rl-radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rl-video-card:hover,
.rl-video-card:focus-visible {
    border-color: var(--rl-card-border-hover);
    box-shadow: 0 0 16px rgba(168, 32, 32, 0.35);
    outline: none;
}

.rl-video-cover {
    position: relative;
}

.rl-video-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* 播放按钮 */
.rl-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: rgba(168, 32, 32, 0.92);
    border: 1px solid var(--rl-yellow);
    border-radius: var(--rl-radius);
    color: var(--rl-white);
    font-size: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rl-video-card:hover .rl-video-play {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 16px rgba(255, 209, 69, 0.35);
}

.rl-video-body {
    padding: 16px;
}

.rl-video-title {
    font-size: 15px;
    color: var(--rl-white);
    margin: 0 0 6px;
    letter-spacing: 1px;
}

.rl-video-author {
    font-size: 12px;
    color: var(--rl-yellow);
    margin: 0 0 8px;
    letter-spacing: 1px;
}

.rl-video-desc {
    font-size: 13px;
    color: rgba(232, 232, 232, 0.65);
    margin: 0;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 6. 视频播放弹窗 ---------- */
.rl-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rl-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.rl-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    background: #161616;
    border: 1px solid var(--rl-card-border);
    border-radius: var(--rl-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.rl-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.6);
}

.rl-modal-title {
    font-size: 14px;
    color: var(--rl-white);
    font-weight: 700;
    letter-spacing: 1px;
}

.rl-modal-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius-sm);
    color: var(--rl-text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.rl-modal-close:hover {
    border-color: var(--rl-red);
    color: var(--rl-white);
}

.rl-modal-video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.rl-modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- 7. 故事集 ---------- */
.rl-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}

.rl-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(51, 51, 51, 0.6);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    color: var(--rl-text);
    font-size: 13px;
    letter-spacing: 1px;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.rl-tag-chip:hover {
    border-color: var(--rl-red);
    color: var(--rl-white);
}

.rl-tag-chip.is-active {
    background: var(--rl-red);
    border-color: var(--rl-red-dark);
    color: var(--rl-white);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--rl-yellow);
}

.rl-story-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rl-story-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.rl-story-cover {
    flex-shrink: 0;
    width: 220px;
    display: block;
    border-radius: var(--rl-radius);
    overflow: hidden;
    border: 1px solid rgba(168, 32, 32, 0.4);
}

.rl-story-cover img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rl-story-cover:hover img {
    transform: scale(1.05);
}

.rl-story-body {
    flex: 1;
    min-width: 0;
}

.rl-story-title {
    font-size: 19px;
    margin: 0 0 6px;
    letter-spacing: 1px;
}

.rl-story-title a {
    color: var(--rl-white);
    text-decoration: none;
    transition: color 0.15s ease;
}

.rl-story-title a:hover {
    color: var(--rl-yellow);
}

.rl-story-meta {
    font-size: 12.5px;
    color: rgba(232, 232, 232, 0.5);
    margin: 0 0 10px;
    letter-spacing: 1px;
}

.rl-story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.rl-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 9px;
    border: 1px solid rgba(255, 209, 69, 0.4);
    border-radius: var(--rl-radius-sm);
    background: rgba(255, 209, 69, 0.06);
    color: var(--rl-yellow);
    text-decoration: none;
    letter-spacing: 1px;
    transition: background 0.15s ease, color 0.15s ease;
}

a.rl-tag:hover {
    background: var(--rl-yellow);
    color: var(--rl-charcoal);
}

.rl-story-excerpt {
    font-size: 13.5px;
    color: rgba(232, 232, 232, 0.7);
    line-height: 1.9;
    margin: 0 0 14px;
}

/* ---------- 8. 故事详情 ---------- */
.rl-story-article {
    max-width: 760px;
    margin: 0 auto;
    padding: 36px 32px;
}

.rl-story-article-head {
    margin-bottom: 8px;
}

.rl-story-article-title {
    font-size: clamp(23px, 4vw, 32px);
    color: var(--rl-white);
    letter-spacing: 2px;
    line-height: 1.5;
    margin: 0;
}

.rl-story-article-cover {
    width: 100%;
    border: 1px solid rgba(168, 32, 32, 0.4);
    border-radius: var(--rl-radius);
    margin: 24px 0 8px;
}

.rl-story-content {
    margin-top: 4px;
}

.rl-story-content p {
    font-size: 15.5px;
    line-height: 2.1;
    color: var(--rl-text);
    margin: 0 0 1.4em;
    white-space: pre-wrap;
    word-break: break-word;
}

.rl-story-footer-note {
    text-align: center;
    font-size: 12px;
    color: rgba(232, 232, 232, 0.35);
    margin: 12px 0 26px;
    letter-spacing: 1px;
}

/* ---------- 9. 空状态 ---------- */
.rl-empty {
    text-align: center;
    padding: 64px 24px;
}

.rl-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    background: repeating-linear-gradient(45deg,
            var(--rl-yellow) 0 6px,
            #1a1a1a 6px 12px);
    border: 2px solid var(--rl-red);
}

.rl-empty-text {
    color: rgba(232, 232, 232, 0.5);
    font-size: 14px;
    margin: 0;
    line-height: 1.9;
}

/* ---------- 10. 分页 ---------- */
.rl-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
}

.rl-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--rl-text);
    background: rgba(51, 51, 51, 0.7);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius-sm);
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.rl-page-btn:hover:not(.is-disabled):not(.is-active) {
    border-color: var(--rl-red);
    color: var(--rl-white);
}

.rl-page-btn.is-active {
    background: var(--rl-red);
    border-color: var(--rl-red-dark);
    color: var(--rl-white);
    font-weight: 700;
}

.rl-page-btn.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rl-page-dots {
    color: rgba(232, 232, 232, 0.4);
    line-height: 36px;
    padding: 0 2px;
}

/* ---------- 分页器外层容器 + 每页条数 ---------- */
/* 说明：照片筛选/分页改为服务端处理后，.rl-pager 包裹 .rl-pagination，
   左侧放「每页 N 张」下拉，右侧为页码按钮。 */
.rl-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed rgba(168, 32, 32, 0.35);
}

.rl-pager .rl-pagination {
    margin: 0;
}

.rl-pager-per {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(232, 232, 232, 0.7);
}

.rl-pager-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 6px 26px 6px 10px;
    font-family: inherit;
    font-size: 13px;
    color: var(--rl-text);
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, transparent 50%, var(--rl-yellow) 50%),
                      linear-gradient(135deg, var(--rl-yellow) 50%, transparent 50%);
    background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    border: 1px solid var(--rl-card-border);
    border-radius: var(--rl-radius);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rl-pager-select:hover,
.rl-pager-select:focus-visible {
    border-color: var(--rl-card-border-hover);
    box-shadow: 0 0 10px rgba(168, 32, 32, 0.4);
    outline: none;
}

.rl-pager-select option {
    background: #1a1a1a;
    color: var(--rl-text);
}

/* ---------- hidden 属性修复（重要）----------
   .rl-gallery-item 声明了 display:block，会覆盖浏览器对 [hidden] 的
   默认 display:none，导致前端 JS 设置 item.hidden=true 完全失效
   （曾导致分类筛选点击无反应）。此处显式兜底，防止同类问题复发。 */
[hidden] {
    display: none !important;
}

/* ---------- 11. 后台补充 ---------- */
.rl-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.rl-admin-tip {
    color: rgba(232, 232, 232, 0.55);
    font-size: 14px;
    margin: 0;
    padding: 10px 4px;
    line-height: 1.9;
}

.rl-table-wrap {
    overflow-x: auto;
}

.rl-table-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--rl-radius-sm);
    border: 1px solid rgba(74, 74, 74, 0.8);
    display: block;
}

.rl-table-link {
    color: var(--rl-yellow);
    text-decoration: none;
    transition: color 0.15s ease;
}

.rl-table-link:hover {
    color: var(--rl-white);
}

.rl-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rl-btn--danger {
    background: #7a1414;
    border-color: #520c0c;
}

.rl-btn--danger:hover {
    filter: brightness(1.3);
    box-shadow: inset 0 0 0 2px var(--rl-yellow);
}

/* 状态徽章 */
.rl-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: var(--rl-radius-sm);
    border: 1px solid rgba(168, 32, 32, 0.5);
    background: rgba(168, 32, 32, 0.12);
    color: rgba(232, 232, 232, 0.85);
    letter-spacing: 1px;
    margin: 1px 2px;
    white-space: nowrap;
}

.rl-badge--ok {
    border-color: rgba(255, 209, 69, 0.5);
    background: rgba(255, 209, 69, 0.08);
    color: var(--rl-yellow);
}

.rl-badge--off {
    border-color: rgba(74, 74, 74, 0.8);
    background: transparent;
    color: rgba(232, 232, 232, 0.45);
}

/* ---------- 12. 后台表单 ---------- */
.rl-form {
    max-width: 860px;
}

.rl-field {
    margin-bottom: 20px;
}

.rl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rl-field-tip {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.45);
    margin: 6px 0 0;
    line-height: 1.7;
}

.rl-required {
    color: var(--rl-yellow);
}

.rl-file {
    padding: 8px 12px;
}

.rl-file::file-selector-button {
    margin-right: 12px;
    padding: 7px 16px;
    background: var(--rl-red);
    border: 1px solid var(--rl-red-dark);
    border-radius: var(--rl-radius-sm);
    color: var(--rl-white);
    font-family: var(--rl-font);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.rl-file::file-selector-button:hover {
    filter: brightness(1.2);
}

.rl-image-preview {
    margin-top: 12px;
}

.rl-image-preview-img {
    max-width: 260px;
    width: 100%;
    border: 1px solid var(--rl-card-border);
    border-radius: var(--rl-radius);
    display: block;
}

.rl-textarea-lg {
    min-height: 320px;
    resize: vertical;
    line-height: 1.9;
}

.rl-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 74, 74, 0.4);
}

/* ============================================================
   阶段 3 · 留言墙 / 投稿 / 验证码 / 后台审核
   ============================================================ */

/* ---------- 13. 前台表单增强 ---------- */
.rl-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.9;
}

/* 标签多选 chips */
.rl-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.rl-chip-check {
    position: relative;
    display: inline-block;
}

.rl-chip-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rl-chip-check span {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(51, 51, 51, 0.6);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    color: var(--rl-text);
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.rl-chip-check:hover span {
    border-color: var(--rl-red);
    color: var(--rl-white);
}

.rl-chip-check input:checked + span {
    background: var(--rl-red);
    border-color: var(--rl-red-dark);
    color: var(--rl-white);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--rl-yellow);
}

.rl-chip-check input:focus-visible + span {
    outline: 2px solid var(--rl-yellow);
    outline-offset: 1px;
}

/* 验证码行 */
.rl-captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rl-captcha-input {
    flex: 1 1 130px;
    max-width: 160px;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-family: var(--rl-font-pixel);
}

.rl-captcha-img {
    height: 44px;
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius-sm);
    background: #121212;
    image-rendering: pixelated;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.rl-captcha-img:hover {
    border-color: var(--rl-red);
}

/* 字段级错误 */
.rl-field-error {
    color: #ff9a9a;
    font-size: 12px;
    margin: 6px 0 0;
    line-height: 1.7;
}

/* ---------- 14. 留言墙布局 ---------- */
.rl-wall-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 28px;
    align-items: start;
}

.rl-wall-aside {
    position: sticky;
    top: 24px;
}

.rl-wall-form-card {
    padding: 24px;
}

.rl-wall-form-title {
    font-size: 18px;
    color: var(--rl-white);
    letter-spacing: 2px;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rl-wall-form-title::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--rl-yellow);
    box-shadow: 0 0 0 2px var(--rl-red-dark);
    flex-shrink: 0;
}

.rl-wall-main {
    min-width: 0;
}

/* 回忆卡片瀑布流 */
.rl-wall-grid {
    columns: 3 240px;
    column-gap: 14px;
}

.rl-wall-card {
    break-inside: avoid;
    margin-bottom: 14px;
    padding: 16px;
}

.rl-wall-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.rl-wall-nick {
    color: var(--rl-white);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

.rl-wall-city {
    font-size: 11px;
    color: var(--rl-yellow);
    border: 1px solid rgba(255, 209, 69, 0.35);
    padding: 1px 8px;
    border-radius: var(--rl-radius-sm);
    letter-spacing: 1px;
}

.rl-wall-text {
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--rl-text);
    margin: 0 0 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.rl-wall-img {
    width: 100%;
    border: 1px solid rgba(168, 32, 32, 0.35);
    border-radius: var(--rl-radius);
    margin-bottom: 10px;
    cursor: zoom-in;
    transition: filter 0.2s ease;
}

.rl-wall-img:hover {
    filter: brightness(1.12);
}

.rl-wall-card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(74, 74, 74, 0.4);
    padding-top: 10px;
}

.rl-wall-date {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.4);
    margin-right: auto;
}

/* 点赞按钮 */
.rl-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(74, 74, 74, 0.8);
    border-radius: var(--rl-radius-sm);
    color: rgba(232, 232, 232, 0.7);
    font-family: var(--rl-font);
    font-size: 12px;
    padding: 3px 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.rl-like-btn:hover {
    border-color: var(--rl-red);
    color: var(--rl-white);
}

.rl-like-btn.is-liked {
    border-color: var(--rl-yellow);
    color: var(--rl-yellow);
}

.rl-like-btn.is-liked .rl-like-heart {
    text-shadow: 0 0 8px rgba(255, 209, 69, 0.6);
}

.rl-like-btn.is-bump {
    animation: rlLikeBump 0.3s ease;
}

@keyframes rlLikeBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* 随机回忆弹窗 */
.rl-random-box {
    max-width: 540px;
}

.rl-random-body {
    padding: 20px 24px 26px;
}

.rl-random-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rl-random-text {
    font-size: 14.5px;
    line-height: 2.1;
    color: var(--rl-text);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.rl-random-img {
    width: 100%;
    border: 1px solid rgba(168, 32, 32, 0.35);
    border-radius: var(--rl-radius);
    margin-top: 14px;
}

.rl-random-empty {
    text-align: center;
    color: rgba(232, 232, 232, 0.5);
    font-size: 14px;
    padding: 28px 0;
    margin: 0;
}

/* ---------- 15. 投稿页 ---------- */
.rl-submit-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px;
}

.rl-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.rl-type-card {
    position: relative;
    display: block;
    padding: 16px 14px;
    background: rgba(51, 51, 51, 0.5);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.rl-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rl-type-card-name {
    display: block;
    color: var(--rl-white);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.rl-type-card-desc {
    display: block;
    font-size: 12px;
    color: rgba(232, 232, 232, 0.55);
    line-height: 1.7;
}

.rl-type-card:hover {
    border-color: var(--rl-red);
}

.rl-type-card.is-active {
    background: rgba(168, 32, 32, 0.18);
    border-color: var(--rl-red);
    box-shadow: inset 0 0 0 1px var(--rl-yellow);
}

.rl-type-card:has(input:checked) {
    background: rgba(168, 32, 32, 0.18);
    border-color: var(--rl-red);
    box-shadow: inset 0 0 0 1px var(--rl-yellow);
}

.rl-type-card:has(input:focus-visible) {
    outline: 2px solid var(--rl-yellow);
    outline-offset: 1px;
}

/* ---------- 16. 后台审核补充 ---------- */
.rl-admin-panel h2 {
    font-size: 16px;
    color: var(--rl-white);
    letter-spacing: 2px;
    margin: 0 0 14px;
}

.rl-admin-panel h2:not(:first-child) {
    margin-top: 28px;
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 960px) {
    .rl-story-card {
        flex-direction: column;
    }

    .rl-story-cover {
        width: 100%;
    }

    .rl-gallery-grid {
        column-gap: 10px;
    }
}

@media (max-width: 1024px) {
    .rl-wall-layout {
        grid-template-columns: 1fr;
    }

    .rl-wall-aside {
        position: static;
    }
}

@media (max-width: 768px) {
    .rl-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 640px) {
    .rl-page {
        padding: 32px 0 56px;
    }

    .rl-page-header {
        margin-bottom: 36px;
    }

    .rl-block {
        margin-bottom: 52px;
    }

    .rl-block-title {
        font-size: 18px;
    }

    .rl-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* 筛选栏：窄屏改为可横向滑动 + 吸附，避免换行拥挤 */
    .rl-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
        margin-left: -2px;
        margin-right: -2px;
    }

    .rl-filter-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .rl-story-article {
        padding: 26px 20px;
    }

    .rl-story-content p {
        font-size: 15px;
        line-height: 2;
    }

    /* 灯箱：移动端隐藏两侧箭头，改用底部工具栏，图片占满高度 */
    .rl-lightbox {
        padding: 0;
    }

    .rl-lightbox-nav {
        display: none;
    }

    .rl-lightbox-toolbar {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 20px;
        z-index: 5;
    }

    .rl-lb-btn {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(18, 18, 18, 0.85);
        border: 1px solid var(--rl-red);
        border-radius: var(--rl-radius);
        color: var(--rl-white);
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        transition: background 0.15s ease, box-shadow 0.15s ease;
    }

    .rl-lb-btn:active {
        background: var(--rl-red);
        box-shadow: inset 0 0 0 1px var(--rl-yellow);
    }

    .rl-lightbox-img {
        max-height: 68vh;
    }

    .rl-lightbox-caption {
        margin-bottom: 60px;
    }

    .rl-modal {
        padding: 0;
    }

    /* 视频弹窗移动端全屏沉浸 */
    .rl-modal-box {
        max-width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .rl-modal-video {
        flex: 1;
        min-height: 0;
    }

    .rl-gallery-caption {
        padding: 18px 10px 8px;
    }

    /* 阶段 3 移动端适配 */
    .rl-wall-form-card {
        padding: 18px;
    }

    .rl-submit-card {
        padding: 22px 16px;
    }

    .rl-type-cards {
        grid-template-columns: 1fr;
    }

    .rl-captcha-input {
        max-width: none;
        flex: 1 1 100%;
    }

    .rl-wall-grid {
        columns: 2 150px;
        column-gap: 10px;
    }

    .rl-wall-card {
        padding: 12px;
    }
}

/* ============================================================
   阶段 4 · 打卡地图（Leaflet 深色主题适配 / 像素标记 / 城市榜）
   ============================================================ */

/* ---------- 18. 统计卡片 ---------- */
.rl-checkin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.rl-checkin-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
}

.rl-checkin-stat-num {
    font-family: var(--rl-font-pixel);
    font-size: 26px;
    color: var(--rl-yellow);
    text-shadow: 2px 2px 0 rgba(168, 32, 32, 0.6);
}

.rl-checkin-stat-label {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.6);
    letter-spacing: 2px;
}

/* ---------- 19. 地图布局 ---------- */
.rl-map-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.rl-map-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.rl-map-aside {
    position: sticky;
    top: 24px;
}

.rl-map-card {
    padding: 24px;
}

.rl-map-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.rl-map-note {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.45);
    letter-spacing: 1px;
}

/* Leaflet 容器：深色底 + 做旧边框（与卡片语言一致） */
.rl-map-canvas {
    height: 560px;
    border: 1px solid rgba(168, 32, 32, 0.35);
    border-radius: var(--rl-radius);
    background:
        linear-gradient(180deg, rgba(18, 18, 18, 0.92), rgba(18, 18, 18, 0.98)),
        repeating-linear-gradient(0deg, transparent 0 23px, rgba(74, 74, 74, 0.12) 23px 24px),
        repeating-linear-gradient(90deg, transparent 0 23px, rgba(74, 74, 74, 0.12) 23px 24px);
    z-index: 0;
}

.rl-map-tip {
    margin: 12px 0 0;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--rl-yellow);
    border: 1px dashed rgba(255, 209, 69, 0.4);
    border-radius: var(--rl-radius-sm);
    background: rgba(255, 209, 69, 0.05);
}

.rl-map-privacy {
    margin: 14px 0 0;
    font-size: 12px;
    color: rgba(232, 232, 232, 0.45);
    line-height: 1.9;
}

/* ---------- 20. Leaflet 深色主题覆盖 ---------- */
.leaflet-container {
    background: #121212;
    font-family: var(--rl-font, "Noto Sans SC", sans-serif);
}

/* 缩放控件：暗红像素风 */
.leaflet-bar a,
.leaflet-bar a:hover {
    background: rgba(18, 18, 18, 0.9);
    color: var(--rl-text);
    border-bottom-color: rgba(74, 74, 74, 0.8);
}

.leaflet-bar a:hover {
    background: var(--rl-red);
    color: var(--rl-white);
}

.leaflet-bar {
    border: 1px solid rgba(168, 32, 32, 0.45);
    border-radius: var(--rl-radius-sm);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 归属控件 */
.leaflet-control-attribution {
    background: rgba(18, 18, 18, 0.82) !important;
    color: rgba(232, 232, 232, 0.55) !important;
    font-size: 11px !important;
    border-radius: var(--rl-radius-sm) 0 0 0;
}

.leaflet-control-attribution a {
    color: rgba(255, 209, 69, 0.75) !important;
}

/* Tooltip：暗红做旧卡片 */
.rl-map-tooltip-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.rl-map-tooltip-wrap.leaflet-tooltip-top::before {
    border-top-color: rgba(168, 32, 32, 0.9);
}

.leaflet-tooltip.rl-map-tooltip-wrap {
    background: rgba(24, 24, 24, 0.96);
    border: 1px solid rgba(168, 32, 32, 0.85);
    border-radius: var(--rl-radius-sm);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 209, 69, 0.25);
    color: var(--rl-text);
    padding: 8px 12px;
}

.rl-map-tooltip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.rl-map-tooltip-city {
    font-size: 13px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 1px;
}

.rl-map-tooltip-count {
    font-size: 11px;
    color: var(--rl-yellow);
    letter-spacing: 1px;
}

/* Popup：暗红做旧卡片 */
.leaflet-popup.rl-map-popup-wrap .leaflet-popup-content-wrapper {
    background: #1a1a1a;
    color: var(--rl-text);
    border: 1px solid rgba(168, 32, 32, 0.85);
    border-radius: var(--rl-radius);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 209, 69, 0.18);
}

.leaflet-popup.rl-map-popup-wrap .leaflet-popup-tip {
    background: #1a1a1a;
    border: 1px solid rgba(168, 32, 32, 0.85);
    box-shadow: none;
}

.leaflet-popup.rl-map-popup-wrap .leaflet-popup-content {
    margin: 14px 16px;
    line-height: 1.8;
}

.leaflet-popup.rl-map-popup-wrap a.leaflet-popup-close-button {
    color: rgba(232, 232, 232, 0.6);
}

.leaflet-popup.rl-map-popup-wrap a.leaflet-popup-close-button:hover {
    color: var(--rl-white);
}

.rl-map-popup-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.6);
}

.rl-map-popup-city {
    font-size: 15px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 1px;
}

.rl-map-popup-province {
    font-size: 11px;
    color: var(--rl-yellow);
}

.rl-map-popup-item + .rl-map-popup-item {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(74, 74, 74, 0.5);
}

.rl-map-popup-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    margin-bottom: 4px;
}

.rl-map-popup-nick {
    color: var(--rl-yellow);
    font-weight: 700;
}

.rl-map-popup-date {
    color: rgba(232, 232, 232, 0.4);
}

.rl-map-popup-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--rl-text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* 像素风城市标记（divIcon） */
.rl-map-marker-wrap {
    background: transparent;
    border: 0;
}

.rl-map-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}

/* 像素灯塔方块：暗红底 + 亮黄描边 + 四角像素齿 */
.rl-map-marker-dot {
    position: absolute;
    inset: 6px;
    background: var(--rl-red);
    border: 1px solid var(--rl-yellow);
    box-shadow:
        0 0 0 2px rgba(18, 18, 18, 0.9),
        0 0 12px rgba(168, 32, 32, 0.75);
    image-rendering: pixelated;
    transition: filter 0.15s ease, transform 0.15s ease;
}

/* 像素齿角（火焰灯塔感） */
.rl-map-marker-dot::before,
.rl-map-marker-dot::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--rl-yellow);
}

.rl-map-marker-dot::before {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.rl-map-marker-dot::after {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 209, 69, 0.5);
}

.rl-map-marker.is-hot .rl-map-marker-dot {
    background: #c02020;
    box-shadow:
        0 0 0 2px rgba(18, 18, 18, 0.9),
        0 0 16px rgba(255, 209, 69, 0.45);
}

.rl-map-marker-num {
    position: relative;
    z-index: 1;
    font-family: var(--rl-font-pixel);
    font-size: 11px;
    color: var(--rl-white);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.rl-map-marker-wrap:hover .rl-map-marker-dot {
    filter: brightness(1.25);
    transform: scale(1.1);
}

/* ---------- 21. 城市灯塔榜 / 最新打卡 ---------- */
.rl-map-panel {
    padding: 24px;
}

.rl-city-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.rl-city-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(51, 51, 51, 0.5);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.rl-city-item:hover {
    border-color: var(--rl-red);
    background: rgba(168, 32, 32, 0.12);
    transform: translateY(-1px);
}

.rl-city-rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rl-font-pixel);
    font-size: 10px;
    color: var(--rl-yellow);
    border: 1px solid rgba(255, 209, 69, 0.35);
    border-radius: var(--rl-radius-sm);
}

.rl-city-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 1px;
}

.rl-city-province {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.4);
}

.rl-city-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--rl-yellow);
    white-space: nowrap;
}

.rl-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rl-latest-item {
    padding: 12px 14px;
    background: rgba(51, 51, 51, 0.4);
    border-left: 2px solid var(--rl-red);
    border-radius: 0 var(--rl-radius) var(--rl-radius) 0;
}

.rl-latest-nick {
    font-size: 13px;
    font-weight: 700;
    color: var(--rl-white);
    margin-right: 8px;
}

.rl-latest-text {
    margin: 6px 0 4px;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(232, 232, 232, 0.75);
    white-space: pre-wrap;
    word-break: break-word;
}

.rl-latest-date {
    font-size: 11px;
    color: rgba(232, 232, 232, 0.4);
}

/* ---------- 22. 响应式 ---------- */
@media (max-width: 1024px) {
    .rl-map-layout {
        grid-template-columns: 1fr;
    }

    .rl-map-aside {
        position: static;
    }
}

@media (max-width: 640px) {
    .rl-map-canvas {
        height: 380px;
    }

    .rl-map-card,
    .rl-map-panel {
        padding: 18px;
    }

    .rl-checkin-stats {
        gap: 10px;
    }

    .rl-checkin-stat {
        padding: 14px 8px;
    }

    .rl-checkin-stat-num {
        font-size: 20px;
    }

    .rl-city-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   阶段 5 · 时间胶囊（像素宝箱卡片 / 模式切换 / 私密查询）
   ============================================================ */

/* ---------- 23. 胶囊布局 ---------- */
.rl-capsule-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.rl-capsule-main {
    min-width: 0;
}

.rl-capsule-aside {
    position: sticky;
    top: 24px;
}

/* ---------- 24. 已解锁胶囊画廊 ---------- */
.rl-capsule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.rl-capsule-card {
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rl-capsule-card:hover {
    border-color: var(--rl-card-border-hover);
    box-shadow: 0 0 16px rgba(168, 32, 32, 0.35);
    transform: translateY(-2px);
}

.rl-capsule-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
}

/* 像素宝箱（纯 CSS 绘制，暗红+亮黄） */
.rl-capsule-chest {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 22px;
    flex-shrink: 0;
}

.rl-capsule-chest-lid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--rl-red);
    border: 1px solid var(--rl-red-dark);
    border-radius: 2px 2px 0 0;
    box-shadow: inset 0 0 0 1px rgba(255, 209, 69, 0.55);
}

.rl-capsule-chest-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: #8a1a1a;
    border: 1px solid var(--rl-red-dark);
    border-radius: 0 0 2px 2px;
}

/* 宝箱锁扣（像素亮黄） */
.rl-capsule-chest-lock {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 8px;
    background: var(--rl-yellow);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.rl-capsule-nick {
    font-size: 14px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 1px;
}

.rl-capsule-date {
    margin-left: auto;
    font-size: 11px;
    color: var(--rl-yellow);
    border: 1px solid rgba(255, 209, 69, 0.35);
    padding: 1px 8px;
    border-radius: var(--rl-radius-sm);
    letter-spacing: 1px;
    white-space: nowrap;
}

.rl-capsule-text {
    font-size: 13.5px;
    line-height: 2;
    color: var(--rl-text);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.rl-capsule-img {
    width: 100%;
    border: 1px solid rgba(168, 32, 32, 0.35);
    border-radius: var(--rl-radius);
    margin-top: 14px;
    cursor: zoom-in;
    transition: filter 0.2s ease;
}

.rl-capsule-img:hover {
    filter: brightness(1.12);
}

/* ---------- 25. 表单补充（模式字段 / 自定义天数 / 私密查询） ---------- */
.rl-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--rl-yellow) 50%),
        linear-gradient(135deg, var(--rl-yellow) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
    cursor: pointer;
}

.rl-capsule-custom-days {
    margin-top: 10px;
}

.rl-capsule-code-label {
    margin-top: 16px;
}

/* 私密查询卡片 */
.rl-capsule-private-card {
    max-width: 720px;
    margin: 0 auto 32px;
    padding: 28px;
}

/* 查询结果卡片 */
.rl-capsule-result {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px;
    border-color: rgba(255, 209, 69, 0.35);
}

/* ---------- 26. 响应式 ---------- */
@media (max-width: 1024px) {
    .rl-capsule-layout {
        grid-template-columns: 1fr;
    }

    .rl-capsule-aside {
        position: static;
    }
}

@media (max-width: 640px) {
    .rl-capsule-grid {
        grid-template-columns: 1fr;
    }

    .rl-capsule-card {
        padding: 16px;
    }

    .rl-capsule-private-card,
    .rl-capsule-result {
        padding: 20px 16px;
    }

    .rl-capsule-date {
        margin-left: 0;
    }
}

/* ============================================================
   阶段 6 · 回忆投票（选项卡片 / 结果条形图 / 后台选项编辑）
   ============================================================ */

/* ---------- 27. 投票卡片 ---------- */
.rl-vote-card {
    padding: 24px;
    margin-bottom: 28px;
}

.rl-vote-card--closed {
    opacity: 0.92;
}

.rl-vote-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.4);
}

.rl-vote-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 1px;
}

.rl-vote-desc {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(232, 232, 232, 0.6);
}

.rl-vote-badge {
    flex-shrink: 0;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 3px 10px;
    border-radius: var(--rl-radius-sm);
    border: 1px solid transparent;
}

.rl-vote-badge--open {
    color: var(--rl-yellow);
    border-color: rgba(255, 209, 69, 0.45);
    background: rgba(255, 209, 69, 0.08);
}

.rl-vote-badge--closed {
    color: rgba(232, 232, 232, 0.55);
    border-color: rgba(74, 74, 74, 0.8);
    background: rgba(51, 51, 51, 0.5);
}

.rl-vote-result-note {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--rl-yellow);
}

/* ---------- 28. 选项网格 ---------- */
.rl-vote-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.rl-vote-option {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    background: rgba(51, 51, 51, 0.4);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rl-vote-option:hover {
    border-color: var(--rl-red);
    transform: translateY(-2px);
}

/* 选中态：暗红描边 + 像素黄内发光 */
.rl-vote-option:has(input:checked) {
    border-color: var(--rl-red);
    box-shadow: 0 0 0 1px var(--rl-red), 0 0 14px rgba(168, 32, 32, 0.35), inset 0 0 0 1px rgba(255, 209, 69, 0.25);
}

.rl-vote-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rl-vote-option-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid rgba(168, 32, 32, 0.3);
    border-radius: var(--rl-radius-sm);
}

.rl-vote-option-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--rl-white);
    text-align: center;
    letter-spacing: 1px;
}

/* 结果可视化：暗红像素条形图 */
.rl-vote-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rl-vote-result-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rl-vote-result-img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(168, 32, 32, 0.3);
    border-radius: var(--rl-radius-sm);
}

.rl-vote-result-body {
    flex: 1;
    min-width: 0;
}

.rl-vote-result-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.rl-vote-result-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 1px;
}

.rl-vote-result-count {
    font-size: 12px;
    color: var(--rl-yellow);
    white-space: nowrap;
}

.rl-vote-result-track {
    height: 14px;
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(74, 74, 74, 0.6);
    border-radius: 2px;
    overflow: hidden;
}

/* 条形：暗红渐变 + 末端像素亮黄方块（进度感） */
.rl-vote-result-bar {
    height: 100%;
    min-width: 0;
    background:
        linear-gradient(90deg, #8a1a1a 0%, var(--rl-red) 70%, #c02020 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 209, 69, 0.35);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.rl-vote-result-bar::after {
    content: "";
    display: block;
    width: 4px;
    height: 100%;
    margin-left: auto;
    background: var(--rl-yellow);
}

/* ---------- 29. 后台：选项编辑与趋势图 ---------- */
.rl-poll-option {
    display: grid;
    grid-template-columns: 36px 120px 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    padding: 16px 0;
    border-bottom: 1px dashed rgba(74, 74, 74, 0.5);
}

.rl-poll-option:last-child {
    border-bottom: 0;
}

.rl-poll-option-index {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rl-font-pixel);
    font-size: 12px;
    color: var(--rl-yellow);
    border: 1px solid rgba(255, 209, 69, 0.35);
    border-radius: var(--rl-radius-sm);
    margin-bottom: 6px;
}

.rl-poll-option-image {
    margin-bottom: 6px;
}

.rl-poll-option .rl-field {
    margin: 0;
}

.rl-poll-option .rl-label {
    font-size: 12px;
}

/* 每日趋势（最近 14 天） */
.rl-poll-trend {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 140px;
    padding: 12px 4px 0;
    border-bottom: 1px solid rgba(74, 74, 74, 0.5);
}

.rl-poll-trend-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
    min-width: 0;
}

.rl-poll-trend-bar {
    width: 100%;
    min-height: 2px;
    background: linear-gradient(180deg, #c02020, var(--rl-red));
    border: 1px solid rgba(255, 209, 69, 0.25);
    border-bottom: 0;
    transition: filter 0.15s ease;
}

.rl-poll-trend-col:hover .rl-poll-trend-bar {
    filter: brightness(1.3);
}

.rl-poll-trend-label {
    font-size: 10px;
    color: rgba(232, 232, 232, 0.4);
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: center;
}

/* ---------- 30. 响应式 ---------- */
@media (max-width: 640px) {
    .rl-vote-card {
        padding: 18px 14px;
    }

    .rl-vote-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rl-vote-option {
        padding: 8px;
    }

    .rl-vote-option-name {
        font-size: 12px;
    }

    .rl-vote-result-row {
        gap: 10px;
    }

    .rl-vote-result-img {
        width: 52px;
        height: 40px;
    }

    .rl-vote-result-name {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rl-poll-option {
        grid-template-columns: 28px 1fr;
        gap: 10px;
    }

    .rl-poll-option-image {
        grid-column: 2;
    }

    .rl-poll-trend {
        height: 110px;
    }
}

/* ============================================================
   阶段 7 · 关于页 / 文件管理 / 系统设置 / 后台页脚 / 全局提示
   ============================================================ */

/* ---------- 31. 关于本站 ---------- */
.rl-about-hero {
    padding: 40px 28px;
    margin-bottom: 28px;
    text-align: center;
}

.rl-about-hero-kicker {
    margin: 0 0 10px;
    font-family: var(--rl-font-pixel);
    font-size: 12px;
    color: var(--rl-yellow);
    letter-spacing: 3px;
}

.rl-about-hero-title {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 4px;
}

.rl-about-hero-slogan {
    margin: 0;
    font-size: 15px;
    color: rgba(232, 232, 232, 0.75);
    letter-spacing: 2px;
}

.rl-about-section {
    padding: 26px 28px;
    margin-bottom: 24px;
}

.rl-about-section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--rl-white);
    letter-spacing: 2px;
    padding-left: 12px;
    border-left: 3px solid var(--rl-red);
}

.rl-about-text p {
    margin: 0 0 14px;
    font-size: 14.5px;
    line-height: 2.1;
    color: var(--rl-text);
}

.rl-about-text p:last-child {
    margin-bottom: 0;
}

.rl-about-text b {
    color: var(--rl-white);
}

/* 免责声明卡：暗红描边 + 序号列表 */
.rl-about-disclaimer {
    padding: 26px 28px;
    margin-bottom: 24px;
    border-color: rgba(168, 32, 32, 0.8);
}

.rl-about-disclaimer-list {
    margin: 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rl-about-disclaimer-list li {
    font-size: 13.5px;
    line-height: 2;
    color: rgba(232, 232, 232, 0.85);
}

.rl-about-disclaimer-list li::marker {
    color: var(--rl-yellow);
    font-family: var(--rl-font-pixel);
    font-size: 12px;
}

.rl-about-disclaimer-list b {
    color: var(--rl-white);
}

.rl-about-disclaimer-foot {
    margin: 18px 0 0;
    font-size: 12px;
    color: rgba(232, 232, 232, 0.45);
    text-align: center;
    letter-spacing: 1px;
}

.rl-about-back {
    text-align: center;
    margin: 8px 0 0;
}

/* ---------- 32. 后台：上传文件管理 / 系统设置 ---------- */
.rl-admin-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.rl-admin-hint {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.45);
}

.rl-files-filter {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    background: rgba(51, 51, 51, 0.35);
    border: 1px dashed rgba(74, 74, 74, 0.6);
    border-radius: var(--rl-radius);
}

.rl-files-filter .rl-field--inline {
    margin: 0;
}

.rl-files-filter .rl-input {
    min-width: 160px;
}

.rl-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.rl-files-item {
    margin: 0;
    background: rgba(51, 51, 51, 0.4);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.rl-files-item:hover {
    border-color: var(--rl-red);
}

.rl-files-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: #0d0d0d;
}

.rl-files-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rl-files-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    font-size: 11px;
}

.rl-files-dir {
    color: var(--rl-yellow);
    letter-spacing: 1px;
}

.rl-files-size,
.rl-files-date {
    color: rgba(232, 232, 232, 0.5);
}

.rl-files-meta .rl-delete-form {
    margin-top: 6px;
}

.rl-admin-note {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 2;
    color: rgba(232, 232, 232, 0.45);
}

.rl-admin-note code {
    padding: 1px 6px;
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(74, 74, 74, 0.6);
    border-radius: var(--rl-radius-sm);
    color: var(--rl-yellow);
    font-size: 11px;
}

/* 后台页脚免责声明（与前台一致） */
.rl-admin-footer {
    padding: 16px 24px 20px;
    text-align: center;
    font-size: 11px;
    line-height: 1.9;
    color: rgba(232, 232, 232, 0.35);
    border-top: 1px solid rgba(74, 74, 74, 0.4);
}

/* 前台 JS 禁用提示 */
.rl-noscript-tip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--rl-yellow);
    background: rgba(18, 18, 18, 0.95);
    border-top: 1px solid rgba(255, 209, 69, 0.4);
}

/* ---------- 33. 响应式补充 ---------- */
@media (max-width: 640px) {
    .rl-about-hero {
        padding: 28px 18px;
    }

    .rl-about-hero-title {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .rl-about-section,
    .rl-about-disclaimer {
        padding: 18px 16px;
    }

    .rl-files-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .rl-files-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rl-admin-footer {
        padding: 12px;
    }
}

/* ---------- 34. 地图底图暗色化（底图改用 OSM 官方瓦片后，用滤镜还原暗调） ----------
   CartoDB dark_all 对本站返回空白瓦片，已改用 tile.openstreetmap.org（同源反代 /carto-tiles/）。
   OSM 底图为浅色，用滤镜压暗并偏冷，使其与 REDLAND 暗红/冷钢灰基调一致。 */
.rl-map-tiles-dark {
    filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.92) saturate(0.55);
}

/* 滤镜后底图整体偏亮灰，压一档亮度让标记点与文字更突出 */
.leaflet-container .leaflet-tile-pane {
    opacity: 0.9;
}

/* 暗色底图上的控件（缩放按钮/版权）反色回浅色，避免黑字看不清 */
.rl-map-tiles-dark ~ .leaflet-control-zoom a,
.leaflet-control-zoom a {
    background: #2a2a2a;
    color: #e8e8e8;
    border-color: rgba(168, 32, 32, 0.55);
}

.leaflet-control-zoom a:hover {
    background: #3a3a3a;
    color: #ffd145;
}

.leaflet-control-attribution {
    background: rgba(18, 18, 18, 0.8) !important;
    color: rgba(232, 232, 232, 0.75) !important;
}

.leaflet-control-attribution a {
    color: rgba(232, 232, 232, 0.9) !important;
}

/* ---------- 34. 画廊分页与筛选响应式适配 ---------- */
@media (max-width: 640px) {
    /* 每页条数下拉独占一行居中，页码按钮另起一行，避免挤压换行错位 */
    .rl-pager {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .rl-pager-per {
        justify-content: center;
    }

    .rl-pager .rl-pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    /* 移动端页码按钮加大点击热区（>=44px） */
    .rl-pager .rl-page-btn {
        min-width: 44px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        padding: 0 10px;
    }

    /* 「上一页/下一页」在窄屏改为更简短的视觉宽度 */
    .rl-pager .rl-page-dots {
        line-height: 40px;
    }

    /* 页头页码提示单独成行 */
    .rl-page-meta-sub {
        display: block;
        margin-top: 4px;
        font-size: 12px;
    }
}

/* ---------- 35. 影像馆：搜索 / 精选栏目 / 点赞（2026-10-19） ---------- */

/* ===== 35.1 搜索框 ===== */
.rl-gallery-search {
    margin-top: 22px;
}

.rl-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    padding: 4px 4px 4px 12px;
    background: rgba(51, 51, 51, 0.7);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius);
    transition: border-color 0.15s ease;
}

.rl-search-box:focus-within {
    border-color: var(--rl-red);
}

.rl-search-icon {
    flex-shrink: 0;
    color: var(--rl-yellow);
    font-size: 17px;
    line-height: 1;
    cursor: default;
}

.rl-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 0;
    background: transparent;
    border: 0;
    color: var(--rl-text);
    font-family: var(--rl-font);
    font-size: 14px;
    letter-spacing: 0.5px;
    outline: none;
}

/* 隐藏浏览器默认的搜索清除按钮，改用自绘的 */
.rl-search-input::-webkit-search-cancel-button {
    display: none;
}

.rl-search-input::placeholder {
    color: rgba(232, 232, 232, 0.42);
}

.rl-search-clear,
.rl-search-submit {
    flex-shrink: 0;
    border: 0;
    font-family: var(--rl-font);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.rl-search-clear {
    padding: 4px 6px;
    background: transparent;
    color: rgba(232, 232, 232, 0.5);
    font-size: 19px;
    line-height: 1;
    border-radius: var(--rl-radius-sm);
}

.rl-search-clear:hover {
    color: var(--rl-yellow);
}

.rl-search-submit {
    padding: 8px 18px;
    background: var(--rl-red);
    color: var(--rl-white);
    font-size: 13px;
    letter-spacing: 2px;
    border-radius: var(--rl-radius-sm);
}

.rl-search-submit:hover {
    background: var(--rl-red-hover);
}

.rl-search-summary {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(232, 232, 232, 0.72);
}

.rl-search-summary strong {
    color: var(--rl-yellow);
    font-weight: 600;
}

.rl-search-summary a {
    margin-left: 10px;
    color: var(--rl-yellow);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 209, 69, 0.5);
}

.rl-search-summary a:hover {
    border-bottom-style: solid;
}

/* ===== 35.2 精选栏目 ===== */
.rl-featured {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--rl-card-border);
}

.rl-featured-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 16px;
}

.rl-featured-head .rl-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.rl-featured-mark {
    color: var(--rl-yellow);
    font-size: 15px;
    text-shadow: 1px 1px 0 var(--rl-red-dark);
}

/* 横向滚动条：精选数量不定，横滑在小屏比换行更省空间 */
.rl-featured-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--rl-red-dark) transparent;
}

.rl-featured-strip::-webkit-scrollbar {
    height: 5px;
}

.rl-featured-strip::-webkit-scrollbar-track {
    background: rgba(51, 51, 51, 0.4);
}

.rl-featured-strip::-webkit-scrollbar-thumb {
    background: var(--rl-red-dark);
    border-radius: 3px;
}

.rl-featured-item {
    flex: 0 0 auto;
    width: 230px;
    margin: 0;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    background: var(--rl-card-bg);
    border: 1px solid var(--rl-card-border);
    border-radius: var(--rl-radius);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.rl-featured-item:hover,
.rl-featured-item:focus-visible {
    transform: translateY(-3px);
    border-color: var(--rl-card-border-hover);
    outline: none;
}

.rl-featured-item .rl-img {
    display: block;
    width: 100%;
    height: 152px;
    object-fit: cover;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.rl-featured-item:hover .rl-img {
    opacity: 0.9;
    filter: brightness(1.06);
}

.rl-featured-cap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
}

.rl-featured-title {
    font-size: 13px;
    color: var(--rl-text);
    line-height: 1.45;
    /* 标题最多两行，超出省略，保证卡片高度一致 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rl-featured-likes {
    font-size: 11px;
    color: rgba(255, 209, 69, 0.85);
    letter-spacing: 0.5px;
}

/* ===== 35.3 点赞按钮 ===== */
.rl-like-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    /* 半透明深底：压在任何图片上都可读 */
    background: rgba(18, 18, 18, 0.82);
    border: 1px solid var(--rl-steel);
    border-radius: var(--rl-radius-sm);
    color: rgba(232, 232, 232, 0.9);
    font-family: var(--rl-font);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.rl-like-btn:hover {
    color: var(--rl-yellow);
    border-color: var(--rl-red);
}

.rl-like-btn .rl-like-icon {
    font-size: 13px;
    line-height: 1;
    /* 未点赞时是空心视觉 */
    opacity: 0.55;
    transition: opacity 0.15s ease, transform 0.2s ease;
}

.rl-like-btn.is-liked {
    color: var(--rl-yellow);
    border-color: var(--rl-yellow);
    background: rgba(110, 16, 16, 0.55);
}

.rl-like-btn.is-liked .rl-like-icon {
    opacity: 1;
}

/* 点击瞬间的心跳反馈，克制不夸张 */
.rl-like-btn.is-busy .rl-like-icon {
    transform: scale(1.25);
}

.rl-like-btn.is-failed {
    color: rgba(232, 232, 232, 0.45);
    border-color: rgba(74, 74, 74, 0.6);
    cursor: not-allowed;
}

/* 精选栏的点赞数是纯展示，不可点 */
.rl-featured-likes {
    cursor: default;
}

/* ===== 35.4 后台列表：精选标记 ===== */
.is-featured-row {
    background: rgba(168, 32, 32, 0.08);
}

.rl-featured-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    background: rgba(168, 32, 32, 0.28);
    border: 1px solid var(--rl-red);
    border-radius: var(--rl-radius-sm);
    color: var(--rl-yellow);
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
    vertical-align: middle;
}

.rl-like-num {
    color: rgba(255, 209, 69, 0.85);
    font-size: 13px;
}

/* ===== 35.5 移动端适配 ===== */
@media (max-width: 640px) {
    .rl-search-box {
        max-width: none;
        padding-left: 10px;
    }

    .rl-search-input {
        font-size: 16px;      /* iOS 下 <16px 会触发聚焦缩放 */
    }

    .rl-search-submit {
        padding: 9px 14px;
        letter-spacing: 1px;
    }

    .rl-featured-strip {
        gap: 10px;
    }

    .rl-featured-item {
        width: 190px;
    }

    .rl-featured-item .rl-img {
        height: 126px;
    }

    /* 点赞热区放大到 >=40px，满足移动端点击友好性 */
    .rl-like-btn {
        padding: 8px 12px;
        right: 6px;
        bottom: 6px;
    }

    .rl-like-btn .rl-like-icon {
        font-size: 15px;
    }

    .rl-featured-tag {
        display: block;
        width: fit-content;
        margin: 4px 0 0;
    }
}
