/* =====================================================================
 * ②号子屏幕 · 相册组件（Char 自拍相册）独立样式
 * ---------------------------------------------------------------------
 * 风格：Korean Minimal（韩式极简）× Vertical Timeline（垂直时间线）
 *   - 主背景 暖白 #faf9f7 / 主文本 石板蓝 #3d4a5c / 点缀 粉彩 #d4a5a5、#a8c5b8
 *   - 极细边框(1px, 低透明度) + 柔和阴影 + 大圆角 + 轻盈字重 + 留白呼吸感
 * 布局：相册主界面为垂直时间轴——左侧连接线串联「按天分组」节点，
 *       每组卡片区同排最多两张照片，卡片下方展示照片来源与保存时间。
 * 入口外观：磨砂玻璃唱片套 + 圆形封面窗 + 右侧黑色胶片（黑色部分恒定）。
 * 主题：随 --lmg-* 与暗色联动；黑色胶片恒为黑。
 * 兼容：iOS Safari / 安卓各厂商浏览器（华为、小米、OPPO、魅族、vivo、三星）
 *       与 Via、夸克、雨见、搜狗等：safe-area、-webkit- 前缀、backdrop-filter
 *       与 aspect-ratio 均有兜底；动画遵循 prefers-reduced-motion。
 * 命名：统一 ss2ab- 前缀，独立文件，不与其它屏幕/组件共用。
 * ===================================================================== */

/* ============ 入口：唱片套组件 ============ */
.ss2ab-entry {
    --ss2ab-sleeve: rgba(250, 249, 247, 0.72);
    --ss2ab-sleeve-border: rgba(255, 255, 255, 0.6);
    --ss2ab-sleeve-shadow: rgba(61, 74, 92, 0.16);
    --ss2ab-text: #3d4a5c;
    --ss2ab-accent: #d4a5a5;
    --ss2ab-window-bg: rgba(255, 255, 255, 0.5);

    position: relative;
    display: block;
    align-self: flex-end;
    width: clamp(170px, 56%, 212px);
    /* 套(正方) + 右侧探出的胶片，整体略宽于高 */
    aspect-ratio: 1.18 / 1;
    /* 入口在②号子屏幕内的偏移：中段靠右留 12px，并为左下快捷区保留呼吸空间 */
    margin: 72px 12px 4px auto;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.3s ease;
}

.ss2ab-entry:active {
    transform: scale(0.96);
}

/* 黑色胶片：恒为黑，不随主题/美化改变 */
.ss2ab-disc {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    height: 84%;
    width: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    z-index: 1;
    background:
        repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0 0.5px, rgba(0, 0, 0, 0) 1.5px 3.5px),
        radial-gradient(circle at 50% 50%, #2a2a2a 0 6%, #0b0b0b 6.5% 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), inset 0 0 14px rgba(0, 0, 0, 0.55);
}

/* 唱片中心标签 + 轴孔 */
.ss2ab-disc::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28%;
    height: 28%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0 16%, #e8cfcf 18% 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* 磨砂玻璃唱片套（盖住胶片左侧） */
.ss2ab-sleeve {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80%;
    z-index: 2;
    border-radius: 20px;
    background: var(--ss2ab-sleeve);
    border: 1px solid var(--ss2ab-sleeve-border);
    box-shadow: 0 8px 24px var(--ss2ab-sleeve-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(15px) saturate(130%);
    backdrop-filter: blur(15px) saturate(130%);
    overflow: hidden;
}

/* 套上的标签徽标：粉彩软底 + 石板蓝字，轻盈克制 */
.ss2ab-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 3;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--ss2ab-text);
    background: rgba(212, 165, 165, 0.28);
    border: 1px solid rgba(212, 165, 165, 0.32);
}

/* 装饰：音符 / 爱心（克制，韩风留白） */
.ss2ab-deco {
    position: absolute;
    z-index: 3;
    color: var(--ss2ab-accent);
    opacity: 0.75;
    pointer-events: none;
    line-height: 1;
}
.ss2ab-deco-note {
    left: 10px;
    bottom: 10px;
    font-size: 18px;
}
.ss2ab-deco-heart {
    right: 9px;
    top: 9px;
    font-size: 13px;
}

/* 圆形封面窗（展示用户设为封面的照片 / 最新照片） */
.ss2ab-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ss2ab-window-bg);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6), inset 0 2px 10px rgba(61, 74, 92, 0.1);
}

.ss2ab-window-img {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ss2ab-window.has-cover .ss2ab-window-img {
    opacity: 1;
}

.ss2ab-window-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    color: var(--ss2ab-accent);
    opacity: 0.7;
}
.ss2ab-window.has-cover .ss2ab-window-empty {
    opacity: 0;
}

/* 数量角标：产品要求不在入口展示照片数量 */
.ss2ab-count {
    display: none !important;
}

/* ============ 主界面：全屏相册（滑入） ============ */
.ss2ab-overlay {
    /* Korean Minimal 设计令牌（供内部统一取用） */
    --ss2ab-km-bg: #faf9f7;
    --ss2ab-km-ink: #3d4a5c;
    --ss2ab-km-ink-soft: rgba(61, 74, 92, 0.55);
    --ss2ab-km-ink-faint: rgba(61, 74, 92, 0.35);
    --ss2ab-km-line: rgba(61, 74, 92, 0.1);
    --ss2ab-km-blush: #d4a5a5;
    --ss2ab-km-sage: #a8c5b8;
    --ss2ab-km-card: #ffffff;
    --ss2ab-km-shadow: 0 4px 12px rgba(61, 74, 92, 0.06);
    --ss2ab-km-shadow-lg: 0 8px 24px rgba(61, 74, 92, 0.08);

    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 6000;
    display: flex;
    flex-direction: column;
    background: var(--ss2ab-km-bg);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0.25, 1);
    will-change: transform;
    color: var(--ss2ab-km-ink);
    font-weight: 300;
    letter-spacing: 0.02em;
}
.ss2ab-overlay.is-open {
    transform: translateX(0);
}

.ss2ab-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: max(14px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px 14px;
    border-bottom: 1px solid var(--ss2ab-km-line);
    background: rgba(250, 249, 247, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.ss2ab-back {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--ss2ab-km-line);
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.ss2ab-back:active {
    background: rgba(61, 74, 92, 0.06);
    box-shadow: 0 1px 3px rgba(61, 74, 92, 0.08);
}

.ss2ab-title {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 300;
    letter-spacing: 0.08em;
}
.ss2ab-title small {
    font-size: 12px;
    font-weight: 300;
    color: var(--ss2ab-km-ink-soft);
    margin-left: 8px;
    letter-spacing: 0.04em;
}

/* ---------- 垂直时间线容器 ---------- */
.ss2ab-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    padding: 20px 18px calc(28px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))) 20px;
    /* 隐形滚动条：保留触摸/滚轮滚动，隐藏各浏览器滚动条轨道 */
    scrollbar-width: none;           /* Firefox / 部分安卓浏览器 */
    -ms-overflow-style: none;        /* IE / 旧 Edge */
}
.ss2ab-grid::-webkit-scrollbar {
    display: none;                   /* Safari / Chrome / Edge / 国产 WebView */
    width: 0;
    height: 0;
    background: transparent;
}

/* 时间线分组：左侧留出轴线区域 */
.ss2ab-tl-group {
    position: relative;
    padding: 0 0 26px 26px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.ss2ab-tl-group.is-shown {
    opacity: 1;
    transform: translateY(0);
}
/* 连接线：贯穿分组左侧，串联所有节点 */
.ss2ab-tl-group::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: -6px;
    width: 1px;
    background: linear-gradient(to bottom, rgba(212, 165, 165, 0.45), var(--ss2ab-km-line));
}
/* 最后一组：连接线渐隐收尾 */
.ss2ab-tl-group:last-child {
    padding-bottom: 8px;
}
.ss2ab-tl-group:last-child::before {
    bottom: 12px;
    background: linear-gradient(to bottom, rgba(212, 165, 165, 0.45), rgba(61, 74, 92, 0));
}

/* 时间节点：粉彩圆点 + 细环 */
.ss2ab-tl-node {
    position: absolute;
    left: 0;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ss2ab-km-blush);
    box-shadow: 0 0 0 3px rgba(212, 165, 165, 0.2);
}

/* 分组标题：日期 + 数量 */
.ss2ab-tl-day {
    margin: 0 0 12px;
    font-size: 13.5px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--ss2ab-km-ink);
    line-height: 1.6;
}
.ss2ab-tl-day small {
    font-size: 11px;
    font-weight: 300;
    color: var(--ss2ab-km-ink-faint);
    margin-left: 8px;
    letter-spacing: 0.06em;
}

/* 卡片区：同排最多两张照片 */
.ss2ab-tl-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ---------- 照片卡片 ---------- */
.ss2ab-cell {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--ss2ab-km-card);
    border: 1px solid var(--ss2ab-km-line);
    box-shadow: var(--ss2ab-km-shadow);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ss2ab-cell:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(61, 74, 92, 0.05);
}

.ss2ab-cell-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(212, 165, 165, 0.08), rgba(168, 197, 184, 0.08));
    overflow: hidden;
}
.ss2ab-cell-img {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.ss2ab-cell-img.is-loaded {
    opacity: 1;
}

/* 照片数据取不回来时的明确提示：避免与「还在加载」的空白格混淆 */
.ss2ab-cell.is-missing .ss2ab-cell-photo::after {
    content: '照片数据丢失';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: rgba(61, 74, 92, 0.42);
}
.ss2ab-cell.is-missing .ss2ab-cell-photo {
    background: repeating-linear-gradient(
        45deg,
        rgba(61, 74, 92, 0.04),
        rgba(61, 74, 92, 0.04) 6px,
        rgba(61, 74, 92, 0.015) 6px,
        rgba(61, 74, 92, 0.015) 12px
    );
}

.ss2ab-cell-flag {
    position: absolute;
    top: 7px;
    left: 7px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(212, 165, 165, 0.9);
    display: none;
}
.ss2ab-cell.is-cover .ss2ab-cell-flag {
    display: block;
}

/* 卡片信息条：来源 + 保存时间 */
.ss2ab-cell-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px 9px;
}
.ss2ab-cell-src {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.03em;
    color: var(--ss2ab-km-ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss2ab-cell-time {
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--ss2ab-km-ink-faint);
    font-variant-numeric: tabular-nums;
}

/* 空状态 */
.ss2ab-empty {
    padding: 64px 28px;
    text-align: center;
    color: var(--ss2ab-km-ink-soft, rgba(61, 74, 92, 0.55));
    font-size: 13.5px;
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 2;
}
.ss2ab-empty-emoji {
    font-size: 34px;
    margin-bottom: 14px;
    opacity: 0.7;
}

/* ============ 大图查看器（韩式极简：暖白磨砂，弃深黑底） ============ */
.ss2ab-viewer {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 6100;
    display: flex;
    flex-direction: column;
    background: rgba(250, 249, 247, 0.92);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    backdrop-filter: blur(18px) saturate(120%);
    color: #3d4a5c;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.ss2ab-viewer.is-open {
    opacity: 1;
    pointer-events: auto;
}

.ss2ab-viewer-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 20px 10px;
}
.ss2ab-viewer-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 16px;
    border: 1px solid rgba(61, 74, 92, 0.08);
    box-shadow: 0 8px 24px rgba(61, 74, 92, 0.12);
    object-fit: contain;
    background: #fff;
}

/* 查看器信息：来源 + 保存时间 */
.ss2ab-viewer-meta {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    padding: 10px 24px 2px;
    font-weight: 300;
    letter-spacing: 0.04em;
}
.ss2ab-viewer-src {
    font-size: 13px;
    color: #3d4a5c;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss2ab-viewer-time {
    font-size: 11.5px;
    color: rgba(61, 74, 92, 0.45);
    font-variant-numeric: tabular-nums;
}
.ss2ab-viewer-src:empty,
.ss2ab-viewer-time:empty {
    display: none;
}

.ss2ab-viewer-bar {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    padding: 12px 18px calc(22px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
    justify-content: center;
}
.ss2ab-viewer-btn {
    flex: 1;
    max-width: 150px;
    padding: 11px 12px;
    border: 1px solid rgba(61, 74, 92, 0.15);
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 300;
    letter-spacing: 0.06em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    color: #3d4a5c;
    background: transparent;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
}
.ss2ab-viewer-btn:active {
    opacity: 0.75;
    box-shadow: 0 1px 3px rgba(61, 74, 92, 0.08);
}
.ss2ab-viewer-btn--primary {
    background: #3d4a5c;
    border-color: #3d4a5c;
    color: #faf9f7;
}
.ss2ab-viewer-btn--save {
    background: rgba(168, 197, 184, 0.18);
    border-color: rgba(168, 197, 184, 0.4);
}
.ss2ab-viewer-btn--danger {
    background: rgba(212, 165, 165, 0.18);
    border-color: rgba(212, 165, 165, 0.45);
    color: #b07a7a;
}
.ss2ab-viewer-close {
    position: absolute;
    top: max(14px, var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(61, 74, 92, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    color: #3d4a5c;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(61, 74, 92, 0.08);
}

/* ============ 暗色模式 ============ */
html[data-appearance="dark"] .ss2ab-entry {
    --ss2ab-sleeve: rgba(40, 40, 46, 0.66);
    --ss2ab-sleeve-border: rgba(255, 255, 255, 0.1);
    --ss2ab-sleeve-shadow: rgba(0, 0, 0, 0.5);
    --ss2ab-text: rgba(245, 245, 250, 0.92);
    --ss2ab-accent: #d9b3b3;
    --ss2ab-window-bg: rgba(255, 255, 255, 0.08);
}
html[data-appearance="dark"] .ss2ab-badge {
    color: rgba(245, 245, 250, 0.92);
    background: rgba(212, 165, 165, 0.24);
    border-color: rgba(212, 165, 165, 0.28);
}
html[data-appearance="dark"] .ss2ab-overlay {
    --ss2ab-km-bg: #202226;
    --ss2ab-km-ink: rgba(240, 240, 245, 0.9);
    --ss2ab-km-ink-soft: rgba(240, 240, 245, 0.55);
    --ss2ab-km-ink-faint: rgba(240, 240, 245, 0.35);
    --ss2ab-km-line: rgba(255, 255, 255, 0.09);
    --ss2ab-km-card: rgba(255, 255, 255, 0.05);
    --ss2ab-km-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    --ss2ab-km-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.32);
}
html[data-appearance="dark"] .ss2ab-head {
    background: rgba(32, 34, 38, 0.8);
}
html[data-appearance="dark"] .ss2ab-viewer {
    background: rgba(28, 29, 33, 0.94);
    color: rgba(240, 240, 245, 0.9);
}
html[data-appearance="dark"] .ss2ab-viewer-img {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}
html[data-appearance="dark"] .ss2ab-viewer-src {
    color: rgba(240, 240, 245, 0.85);
}
html[data-appearance="dark"] .ss2ab-viewer-time {
    color: rgba(240, 240, 245, 0.4);
}
html[data-appearance="dark"] .ss2ab-viewer-btn {
    color: rgba(240, 240, 245, 0.9);
    border-color: rgba(255, 255, 255, 0.14);
}
html[data-appearance="dark"] .ss2ab-viewer-btn--primary {
    background: rgba(240, 240, 245, 0.9);
    border-color: transparent;
    color: #2b2d33;
}
html[data-appearance="dark"] .ss2ab-viewer-btn--danger {
    color: #d9a3a3;
}
html[data-appearance="dark"] .ss2ab-viewer-close {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(240, 240, 245, 0.9);
}

/* ============ 全局美化联动（黑色胶片不变） ============ */
html[data-global-beautify="1"] .ss2ab-entry {
    --ss2ab-sleeve: var(--lmg-sub-component-bg);
    --ss2ab-sleeve-border: var(--lmg-border);
    --ss2ab-sleeve-shadow: var(--lmg-shadow);
    --ss2ab-text: var(--lmg-text);
    --ss2ab-accent: var(--lmg-button-text);
    --ss2ab-window-bg: var(--lmg-icon-bg);
}
html[data-global-beautify="1"] .ss2ab-overlay {
    --ss2ab-km-bg: var(--lmg-sub-bg);
    --ss2ab-km-ink: var(--lmg-text);
    --ss2ab-km-line: var(--lmg-border);
    background: var(--lmg-sub-bg);
    color: var(--lmg-text);
}
html[data-global-beautify="1"] .ss2ab-head {
    background: transparent;
}
html[data-global-beautify="1"][data-global-beautify-style="minimal"] .ss2ab-sleeve {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* ============ 兼容兜底：不支持 backdrop-filter ============ */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .ss2ab-sleeve { background: rgba(250, 249, 247, 0.95); }
    .ss2ab-head { background: #faf9f7; }
    .ss2ab-viewer { background: rgba(250, 249, 247, 0.99); }
    html[data-appearance="dark"] .ss2ab-sleeve { background: rgba(42, 42, 48, 0.96); }
    html[data-appearance="dark"] .ss2ab-head { background: #202226; }
    html[data-appearance="dark"] .ss2ab-viewer { background: rgba(28, 29, 33, 0.99); }
}

/* ============ 兼容兜底：不支持 aspect-ratio（老 WebView） ============ */
@supports not (aspect-ratio: 1 / 1) {
    .ss2ab-entry { height: 150px; }
    .ss2ab-disc { height: 84%; width: 126px; }
    .ss2ab-window { width: 96px; height: 96px; }
    .ss2ab-cell-photo { height: 0; padding-bottom: 100%; }
    .ss2ab-cell-img { height: auto; }
}

/* ============ 动画偏好：减少动态效果 ============ */
@media (prefers-reduced-motion: reduce) {
    .ss2ab-overlay,
    .ss2ab-tl-group,
    .ss2ab-cell,
    .ss2ab-cell-img,
    .ss2ab-window-img,
    .ss2ab-viewer {
        transition: none;
    }
    .ss2ab-tl-group {
        opacity: 1;
        transform: none;
    }
}

/* 窄屏微调（老款小屏机型） */
@media (max-width: 360px) {
    .ss2ab-entry { width: clamp(150px, 60%, 190px); }
    .ss2ab-grid { padding: 16px 14px calc(24px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))) 16px; }
    .ss2ab-tl-group { padding-left: 22px; }
    .ss2ab-tl-cards { gap: 9px; }
    .ss2ab-cell-meta { padding: 7px 8px 8px; }
    .ss2ab-cell-src { font-size: 10.5px; }
    .ss2ab-cell-time { font-size: 10px; }
}

/* ============ 分类主菜单（旅行 / 日常） ============ */
.ss2ab-cat-group {
    padding-bottom: 30px;
}

.ss2ab-cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--ss2ab-km-line);
    border-radius: 18px;
    background: var(--ss2ab-km-card);
    box-shadow: var(--ss2ab-km-shadow);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    color: inherit;
    font: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ss2ab-cat-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(61, 74, 92, 0.05);
}

/* 分类封面缩略图：无照片时显示占位图标 */
.ss2ab-cat-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 14px;
    background-color: rgba(212, 165, 165, 0.12);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ss2ab-cat-thumb-empty {
    font-size: 24px;
    opacity: 0.75;
}
.ss2ab-cat-thumb.has-cover .ss2ab-cat-thumb-empty {
    display: none;
}

.ss2ab-cat-info {
    flex: 1;
    min-width: 0;
}
.ss2ab-cat-name {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.5;
    color: var(--ss2ab-km-ink);
}
.ss2ab-cat-desc {
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.6;
    color: var(--ss2ab-km-ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ss2ab-cat-arrow {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--ss2ab-km-ink-faint);
}

html[data-appearance="dark"] .ss2ab-cat-card {
    background: rgba(42, 42, 48, 0.92);
}

@media (prefers-reduced-motion: reduce) {
    .ss2ab-cat-card { transition: none; }
}

@media (max-width: 360px) {
    .ss2ab-cat-card { padding: 12px; gap: 12px; }
    .ss2ab-cat-thumb { width: 56px; height: 56px; }
}
