/* AI家园 · 手账 页面样式 v3（移动优先 · 一体卡「一日一页」· 暖色手账风，罩 dark-base 主题变量） */

.journal-wrap { max-width: 690px; margin: 0 auto; padding: 18px 14px 110px; }

/* ============ Hero ============ */
.journal-hero { text-align: center; margin: 4px 0 16px; }
.journal-hero h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; letter-spacing: 1px;
    background: linear-gradient(135deg, #fbbf24, #f472b6, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.journal-hero .sub { color: var(--ui-muted, rgba(255,255,255,0.45)); font-size: 0.85rem; }

/* ============ 一体卡（单卡承载整页） ============ */
.jpage { position: relative; background: linear-gradient(172deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02) 40%, rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.10); border-radius: 22px;
    box-shadow: 0 10px 34px rgba(0,0,0,0.30); overflow: hidden; }
.jpage::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, #f59e0b, #f472b6, #a78bfa, #38bdf8); opacity: 0.9; }

/* 卡头：日期条 + 统计 + 完整度 + AI 小结 */
.jpage-head { padding: 18px 16px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }

/* 分区：divider 分隔的 section，accent 落在标题图标/选中态，不再整卡着色 */
.jsec { padding: 15px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.jsec:last-of-type { border-bottom: none; }
.jsec h3 { display: flex; align-items: center; gap: 9px; font-size: 0.96rem; color: var(--form-text, #e2e8f0);
    margin: 0 0 12px; font-weight: 700; }
.jsec h3 .jico { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 1.05rem; background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent-edge); }
.jsec h3 .jt { flex-shrink: 0; }
.jsec h3 .jmeta { margin-left: auto; font-size: 0.76rem; font-weight: 500; color: var(--accent); }
.jsec h3 .jsub { display: block; font-size: 0.74rem; font-weight: 400; color: var(--ui-muted, rgba(255,255,255,0.45)); }

/* 分区强调色（accent=实色；soft=淡底；edge=描边，避免 color-mix 兼容性） */
.jsec.weather  { --accent: #f59e0b; --accent-soft: rgba(245,158,11,0.16);  --accent-edge: rgba(245,158,11,0.55); }
.jsec.mood     { --accent: #f472b6; --accent-soft: rgba(244,114,182,0.16); --accent-edge: rgba(244,114,182,0.55); }
.jsec.todos    { --accent: #818cf8; --accent-soft: rgba(129,140,248,0.16); --accent-edge: rgba(129,140,248,0.55); }
.jsec.content  { --accent: #34d399; --accent-soft: rgba(52,211,153,0.16);  --accent-edge: rgba(52,211,153,0.55); }
.jsec.photos   { --accent: #fb923c; --accent-soft: rgba(251,146,60,0.16);  --accent-edge: rgba(251,146,60,0.55); }
.jsec.stickers { --accent: #e879f9; --accent-soft: rgba(232,121,249,0.16); --accent-edge: rgba(232,121,249,0.55); }
.jsec.calendar { --accent: #38bdf8; --accent-soft: rgba(56,189,248,0.16);  --accent-edge: rgba(56,189,248,0.55); }

/* ============ 卡头：概览统计 + 完整度 ============ */
.jstats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.jpill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
    font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.jpill b { color: #fbbf24; font-weight: 700; }
.jprogress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.jprogress-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.jprogress-fill { height: 100%; width: 0; border-radius: 4px; transition: width 0.4s ease;
    background: linear-gradient(90deg, #f59e0b, #f472b6); }
.jprogress-label { min-width: 34px; text-align: right; font-size: 0.8rem; color: var(--ui-muted, rgba(255,255,255,0.5)); font-variant-numeric: tabular-nums; }
.j-summary-btn { display: block; width: 100%; padding: 11px 0; border: 1px solid rgba(251,191,36,0.4);
    border-radius: 12px; background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(236,72,153,0.14));
    color: #fbbf24; font-size: 0.92rem; font-weight: 700; cursor: pointer; transition: transform 0.12s, opacity 0.2s; }
.j-summary-btn:active { transform: scale(0.98); }
.j-summary-btn:disabled { opacity: 0.55; cursor: wait; }
.j-summary-result { margin: 10px 0 0; padding: 13px 15px; background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.22); border-radius: 14px; font-size: 0.9rem;
    color: rgba(255,255,255,0.9); line-height: 1.65; text-align: left; }
.j-summary-result .mood-word { display: inline-block; margin-left: 8px; padding: 2px 10px;
    border-radius: 12px; background: rgba(244,114,182,0.18); color: #f9a8d4; font-size: 0.8rem; }

/* ============ 日期条 ============ */
.journal-datebar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.jdate-nav { width: 46px; height: 46px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%; background: rgba(255,255,255,0.04); color: #e2e8f0; font-size: 1.35rem;
    line-height: 1; cursor: pointer; transition: background 0.15s, transform 0.12s; }
.jdate-nav:active { background: rgba(255,255,255,0.12); transform: scale(0.94); }
.jdate-center { flex: 1; text-align: center; min-width: 0; }
.jdate-label { font-size: 1.18rem; font-weight: 800; color: #f1f5f9; }
.jdate-hint { font-size: 0.76rem; color: var(--ui-muted, rgba(255,255,255,0.45)); margin-top: 1px; }
.jdate-today { padding: 0 16px; height: 46px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 0.85rem; font-weight: 700;
    cursor: pointer; flex-shrink: 0; box-shadow: 0 2px 10px rgba(99,102,241,0.35); transition: transform 0.12s; }
.jdate-today:active { transform: scale(0.95); }

/* ============ 点选 chips（天气/心情/贴纸面板共用） ============ */
.jchips { display: flex; flex-wrap: wrap; gap: 8px; }
.jchip { min-width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
    background: rgba(255,255,255,0.03); cursor: pointer; transition: transform 0.12s, background 0.15s, box-shadow 0.15s; }
.jchip:active { transform: scale(0.92); }
.jchip.on { background: var(--accent-soft);
    border-color: var(--accent-edge);
    box-shadow: 0 0 0 2px var(--accent-soft); }

/* ============ 待办 ============ */
.jtodo-item { display: flex; align-items: center; gap: 10px; padding: 11px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.05); }
.jtodo-item:last-child { border-bottom: none; }
.jtodo-item input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent, #818cf8); flex-shrink: 0; }
.jtodo-text { flex: 1; font-size: 0.95rem; color: rgba(255,255,255,0.88); word-break: break-all; }
.jtodo-item.done .jtodo-text { text-decoration: line-through; color: var(--ui-muted, rgba(255,255,255,0.4)); }
.jtodo-del { border: none; background: none; color: #f87171; font-size: 1rem; cursor: pointer; padding: 8px; border-radius: 8px; }
.jtodo-del:active { background: rgba(248,113,113,0.15); }
.jtodo-add { display: flex; gap: 8px; margin-top: 12px; }
.jtodo-add input { flex: 1; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
    background: var(--form-input-bg, rgba(255,255,255,0.05)); color: var(--form-text, #e2e8f0); font-size: 0.95rem; outline: none; }
.jtodo-add input:focus { border-color: var(--accent, #818cf8); }
.jtodo-add button { width: 46px; height: 46px; flex-shrink: 0; border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent, #818cf8), #8b5cf6);
    color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; transition: transform 0.12s; }
.jtodo-add button:active { transform: scale(0.92); }

/* ============ 随手记 + 语音 ============ */
.jcontent { width: 100%; min-height: 100px; padding: 13px 15px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12); background: var(--form-input-bg, rgba(255,255,255,0.05));
    color: var(--form-text, #e2e8f0); font-size: 0.98rem; line-height: 1.65; resize: vertical; outline: none; }
.jcontent:focus { border-color: var(--accent, #34d399); }
.voice-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.jvoice-btn { display: flex; align-items: center; gap: 6px; padding: 11px 18px; border: 1px solid rgba(16,185,129,0.4);
    border-radius: 12px; background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(16,185,129,0.06));
    color: #6ee7b7; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: transform 0.12s; }
.jvoice-btn:active { transform: scale(0.96); }
.jvoice-btn.recording { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.55); color: #fca5a5;
    animation: j-pulse 1.1s infinite; }
@keyframes j-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }
.jvoice-status { font-size: 0.8rem; color: var(--ui-muted, rgba(255,255,255,0.45)); }

/* ============ 照片 ============ */
.jphotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jphoto { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); }
.jphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jphoto .del { position: absolute; top: 5px; right: 5px; width: 27px; height: 27px; border: none;
    border-radius: 50%; background: rgba(0,0,0,0.62); color: #fff; font-size: 0.9rem; cursor: pointer; }
.jphoto-add { display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: rgba(255,255,255,0.4);
    border: 1px dashed rgba(255,255,255,0.18); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.jphoto-add:active { color: #fb923c; border-color: #fb923c; }
.jphoto-actions { display: flex; gap: 8px; margin-top: 12px; }
.jphoto-actions button { flex: 1; padding: 12px 0; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
    background: rgba(255,255,255,0.04); color: #e2e8f0; font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: transform 0.12s, background 0.15s; }
.jphoto-actions button:active { transform: scale(0.97); background: rgba(255,255,255,0.08); }

/* ============ 贴纸 ============ */
.jstickers { min-height: 48px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
    padding: 10px 12px; border: 1px dashed rgba(255,255,255,0.14); border-radius: 14px; margin-bottom: 12px; }
.jstickers .st { font-size: 1.55rem; background: none; border: none; padding: 2px 4px; cursor: pointer; border-radius: 8px; transition: background 0.15s; }
.jstickers .st:hover { background: rgba(255,255,255,0.08); }
.jsticker-hint { color: var(--ui-subtle, rgba(255,255,255,0.35)); font-size: 0.8rem; }
.jsticker-palette { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ 月历 ============ */
.jcalendar-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; }
.jcalendar-nav .cap { font-size: 0.95rem; font-weight: 700; color: #e2e8f0; min-width: 112px; text-align: center; }
.jcalendar-nav button { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
    background: rgba(255,255,255,0.04); color: #e2e8f0; cursor: pointer; transition: background 0.15s; }
.jcalendar-nav button:active { background: rgba(255,255,255,0.1); }
.jcalendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.jcalendar .dow { text-align: center; font-size: 0.72rem; color: var(--ui-subtle, rgba(255,255,255,0.4)); padding: 4px 0; }
.jcalendar .cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px;
    font-size: 0.88rem; color: rgba(255,255,255,0.8); cursor: pointer; position: relative; transition: background 0.13s; }
.jcalendar .cell:hover { background: rgba(255,255,255,0.05); }
.jcalendar .cell.empty { cursor: default; color: transparent; }
.jcalendar .cell.empty:hover { background: transparent; }
.jcalendar .cell.today { border: 1px solid rgba(99,102,241,0.6); color: #a5b4fc; font-weight: 700; }
.jcalendar .cell.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-weight: 700; }
.jcalendar .cell .dot { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #f472b6; }
.jcalendar .cell.active .dot { background: #fff; }

/* ============ 加载 / 删除脚 ============ */
.journal-loading { display: none; text-align: center; padding: 26px; color: var(--ui-muted); }
.jpage-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.journal-delete { display: block; margin: 0 auto; padding: 11px 22px; border: 1px solid rgba(248,113,113,0.4);
    border-radius: 12px; background: rgba(248,113,113,0.08); color: #f87171; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s; }
.journal-delete:hover { background: rgba(248,113,113,0.16); }