﻿/* ==========================================================
   Like WebNote - 响应式样式 (手机优先 Mobile-First)
   设计: 暖白纸感 + 墨色 + 焦糖橙朱批色 (艺术手工感)
   布局: 画面利用率 >90%, 面板宽 96%, 编辑器面板 ≥75%
   ========================================================== */

:root {
    --bg: #f3edde;            /* 宣纸米 (宋徽宗) */
    --panel: #fffdf6;         /* 米白面板 */
    --panel-soft: #f7f2e5;    /* 浅宣纸 */
    --ink: #3a3326;           /* 墨褐文字 */
    --ink-2: #6b6252;         /* 次级文字 */
    --ink-3: #a39a86;         /* 弱文字 */
    --line: #ddd4c0;          /* 纸纹分隔线 */
    --accent: #b2482a;        /* 朱砂印章红 */
    --accent-soft: #f6e3d8;   /* 朱砂浅底 */
    --accent-ink: #fbf3ee;
    --danger: #a03028;
    --danger-soft: #f6e0dc;
    --ok: #4a7c5f;            /* 石绿 */
    --ok-soft: #e4efe6;
    --sky: #3e6b8e;           /* 天青 */
    --sky-soft: #e3ecef;      /* 天青浅底 */
    --radius: 12px;           /* 卡片 */
    --radius-sm: 8px;         /* 输入/按钮 */
    --shadow: 0 1px 2px rgba(58, 51, 38, 0.06), 0 3px 10px rgba(58, 51, 38, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-tap-highlight-color: transparent;
}

a { text-decoration: none; color: inherit; }

/* ---------------- 登录 / 注册 (认证页) ---------------- */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 12px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 22px 18px;
}

.auth-logo {
    text-align: center;
    font-size: 40px;
    line-height: 1.2;
}

.auth-title {
    text-align: center;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 6px 0 2px;
}

.auth-sub {
    text-align: center;
    color: var(--ink-3);
    font-size: 13px;
    margin-bottom: 14px;
}

/* 登录/注册 Tab 切换 */
.auth-tabs {
    display: flex;
    background: var(--panel-soft);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 14px;
    gap: 3px;
}

.auth-tab {
    flex: 1;
    height: 38px;
    border: none;
    border-radius: 7px;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.auth-tab.active {
    background: var(--panel);
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(28, 28, 26, 0.08);
}

.auth-tab:active { opacity: 0.8; }

.field { margin-bottom: 12px; }

.field label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.hint {
    font-style: normal;
    font-weight: 400;
    color: var(--ink-3);
    font-size: 12px;
}

/* 数据库模式单选框 */
.dbmode-box {
    padding: 10px 12px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.dbmode-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dbmode-radio {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 !important;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.dbmode-radio input { accent-color: var(--accent); }

.dbmode-radio:hover { border-color: var(--accent); color: var(--accent); }

.dbmode-radio:has(input:checked) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.dbmode-tip {
    margin-top: 6px;
    font-size: 12px;
    color: var(--ink-3);
}

.input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 15px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    background: #fdfcfa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
    display: block;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, background 0.2s, border-color 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline:active { background: var(--accent-soft); }

.btn-sm {
    width: auto;
    height: 30px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 7px;
}

.msg {
    display: block;
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
}

.msg-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f2c4c4; }
.msg-info  { background: #eaf2fa; color: #1d6fa5; border: 1px solid #c3d9ec; }

.auth-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-3);
}

/* 用户表查看 (登录页调试用) */
.usertable-box {
    margin-top: 12px;
    max-height: 380px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.usertable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.usertable th, .usertable td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.usertable th {
    background: var(--panel-soft);
    position: sticky;
    top: 0;
    font-weight: 600;
}

.usertable .mono {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 11px;
    color: var(--ink-2);
}

.link { color: var(--accent); font-weight: 600; }
.link:active { opacity: 0.7; }

/* ---------------- 顶部导航栏 ---------------- */

.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    width: 96%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
    color: var(--ink);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.brand::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--accent);
    flex-shrink: 0;
}

.topbar-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

/* 顶部导航链接: 无边框文本按钮, 与导航条融为一体 */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.topbar .btn-sm { height: 28px; }

.user-chip {
    font-size: 11px;
    color: var(--ink-2);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 手机端: 隐藏用户徽章, 节省导航空间 */
@media (max-width: 560px) {
    .user-chip { display: none; }
    .brand::before { display: none; }
}

/* ---------------- 主页 ---------------- */

.home-body {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 让表单占满剩余高度 */
.home-body form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 通用主内容区: 96% 宽, 高利用率 */
.home-main {
    width: 96%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 0;
    flex: 1;
}

/* 主页: 内容从顶部开始 */
.home-center {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.home-center .card { width: 100%; }

/* 功能入口卡片 */
.entry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.entry-card {
    display: block;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--ink);
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.15s;
}

a.entry-card:hover {
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.entry-soon { opacity: 0.6; cursor: default; }

.entry-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    font-size: 17px;
    vertical-align: middle;
}

.entry-name {
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    vertical-align: middle;
}

.entry-desc {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px)  { .entry-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .entry-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1300px) { .entry-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }

/* AI 聊天网站链接 (单独一行) */
.ai-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ai-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    margin-right: 2px;
}

.ai-btn {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}

.ai-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* 快捷入口按钮 (更醒目) */
.ai-btn-main {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.ai-btn-main:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    opacity: 0.9;
}

/* ---------------- 日记页 ---------------- */

.diary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 900px) {
    .diary-grid { grid-template-columns: 30% 1fr; align-items: start; }
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cal-title { font-size: 15px; margin: 0; font-weight: 700; }

.cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 12px;
    user-select: none;
}

.cal-nav-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 3px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-cell {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 13px;
    color: var(--ink);
}

@media (min-width: 900px) {
    /* 电脑端日历格子不吃正方形, 压缩高度 */
    .cal-cell { aspect-ratio: auto; min-height: 34px; }
}

.cal-cell a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    color: inherit;
}

.cal-empty { visibility: hidden; }

.cal-cell a:hover { background: var(--accent-soft); }

.cal-has a {
    background: #f7ead0;
    color: #8a6d1f;
    font-weight: 700;
    position: relative;
}

.cal-has a::after {
    content: "▲";
    position: absolute;
    top: 1px;
    right: 4px;
    font-size: 7px;
    color: #b8932f;
}

/* 有录音的日期: 天青 (宋徽宗) 麦克风标记 */
.cal-has-audio a {
    background: var(--sky-soft);
    color: var(--sky);
}

.cal-has-audio a::after {
    content: "🎤";
    top: 0;
    right: 1px;
    font-size: 8px;
}

.cal-mark { font-style: normal; }

/* 最近录音列表 */
.recent-audio-wrap { margin-top: 10px; }

/* ---------------- 笔记页 ---------------- */

/* 搜索框: 放大镜图标内嵌 */
.note-search {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.note-search .btn { flex-shrink: 0; }

.search-wrap {
    position: relative;
    flex: 1;
    display: block;
}

.search-ico {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
}

.search-input {
    padding-left: 33px;
    height: 34px;
    font-size: 13px;
}

.btn-search {
    height: 34px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-search:hover { opacity: 0.9; }

.note-list { display: flex; flex-direction: column; gap: 4px; }

.note-item {
    display: block;
    padding: 8px 10px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    transition: border-color 0.15s, background 0.15s;
}

.note-item:hover { border-color: var(--accent); background: var(--panel); }

.note-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.note-item-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 2px;
    word-break: break-all;
}

.note-item-preview {
    font-size: 12px;
    color: var(--ink-3);
    word-break: break-all;
    margin-bottom: 2px;
}

.note-item-time {
    font-size: 11px;
    color: var(--ink-3);
}

.note-empty {
    text-align: center;
    color: var(--ink-3);
    font-size: 13px;
    padding: 20px 10px;
}

/* 语言模式下拉框 (位于文本编辑器下边) */
.editor-wrap { position: relative; }

.lang-cornor {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 4px;
}

.lang-cornor:hover { border-color: var(--accent); }

.lang-cornor select {
    height: 26px;
    font-size: 12px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ink-2);
    max-width: 170px;
    cursor: pointer;
}

/* 标题 + 输入框一行 (节省纵向空间, 编辑器更大) */
.title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.title-row .editor-title {
    margin-bottom: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.title-row .input {
    flex: 1;
    height: 30px;
    font-size: 13px;
}

/* Ace 编辑器: 高度用视口百分比, 充分利用屏幕 */
.ace-editor {
    width: 100%;
    min-height: 300px;
    height: 62vh;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fdfcfa;
    font-size: 14px;
}

.ace-editor:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-input {
    height: 38px;
    padding: 0 9px;
    background: #fdfcfa;
    cursor: pointer;
    font-size: 14px;
}

/* ---------------- OneNote 风格笔记布局 ---------------- */

.onenote {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* 分区标签栏 (OneNote section tabs) - 轻量无边框风格 */
.section-tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 4px 10px 0;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar { display: none; }

.sec-tab {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 9px 9px 0 0;
    border: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.sec-active {
    background: var(--panel);
    border-bottom: 3px solid var(--accent);
}

.sec-link {
    display: inline-block;
    padding: 7px 4px 7px 11px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
}

.sec-active .sec-link { color: var(--ink); }

.sec-cnt {
    font-style: normal;
    font-size: 11px;
    color: var(--ink-3);
    margin-left: 2px;
}

.sec-del {
    padding: 7px 8px 7px 3px;
    font-size: 14px;
    color: var(--ink-3);
    cursor: pointer;
}

.sec-del:hover { color: var(--danger); }

.sec-add {
    flex-shrink: 0;
    align-self: center;
    width: 26px;
    height: 26px;
    margin: 0 3px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 16px;
    color: var(--ink-3);
    cursor: pointer;
}

.sec-add:hover { background: var(--accent-soft); color: var(--accent); }

/* 主体: 页面列表(19%) + 编辑器(81%), 编辑器 ≥75% */
.onenote-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 900px) {
    .onenote-body { grid-template-columns: 19% 1fr; align-items: start; }
}

/* 页面列表栏: 浅灰背景区分主编辑区 */
.page-pane {
    padding: 10px;
    background: var(--panel-soft);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

@media (min-width: 900px) {
    .page-pane { border-bottom: none; }
}

.pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 5px;
}

.pane-title { font-size: 14px; color: var(--ink); }

.note-editor {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* ---------------- 机密保险箱 ---------------- */

/* 锁屏 / 初始化: 内容垂直水平居中 */
.secret-center {
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 8px;
}

.secret-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 20px 18px;
    text-align: center;
}

.secret-ico { font-size: 40px; margin-bottom: 6px; }

.secret-card .field { text-align: left; }

.secret-card .editor-actions { justify-content: center; }

/* 已解锁顶栏: 左侧标签占位 + 右侧锁定按钮 */
.sec-tab-bar {
    background: var(--panel);
    border-bottom: 3px solid var(--accent);
}

.sec-tab-bar .sec-link { color: var(--ink); }

.sec-tab-spacer { flex: 1; }

.lock-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 3px 5px;
    white-space: nowrap;
}

.lock-hint {
    font-size: 11px;
    color: var(--ok);
    background: var(--ok-soft);
    border-radius: 999px;
    padding: 3px 9px;
    font-weight: 600;
}

.recent-audio {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.recent-audio h3 {
    font-size: 14px;
    color: var(--ink);
    margin-bottom: 6px;
}

.recent-audio ul { list-style: none; }

.recent-audio li { margin-bottom: 3px; }

.recent-audio li a {
    display: block;
    padding: 7px 9px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--ink);
}

.recent-audio li a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.cal-today a {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(178, 72, 42, 0.3);
}

.cal-today.cal-has a { background: var(--accent); color: #fff; }
.cal-today.cal-has a::after { color: #fff; }

.cal-selected a { outline: 2px solid var(--accent); outline-offset: -2px; }

.cal-hint { margin-top: 8px; font-size: 11px; color: var(--ink-3); text-align: center; }

/* 编辑器 */

.editor-title { font-size: 16px; margin-bottom: 8px; font-weight: 800; letter-spacing: -0.01em; }

.textarea {
    width: 100%;
    padding: 11px 13px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    background: #fdfcfa;
    resize: vertical;
    min-height: 40vh;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.textarea:focus {
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.mood-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.mood-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-soft);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.mood-item:has(input:checked) {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.mood-item input { accent-color: var(--accent); }

.editor-actions {
    display: flex;
    gap: 7px;
    margin-top: 8px;
}

.editor-actions .btn { width: auto; min-width: 90px; padding: 0 18px; }

/* 语音日记 */
.voice-box {
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    padding: 11px;
    background: var(--panel-soft);
}

.voice-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rec-time {
    font-size: 17px;
    font-weight: 700;
    color: var(--danger);
    font-variant-numeric: tabular-nums;
}

.rec-status { font-size: 12px; color: var(--ink-2); }

.audio-wrap {
    margin-top: 9px;
    padding: 9px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audio-wrap audio { display: block; width: 100%; }

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #f2c4c4;
}

.btn-danger:hover { background: #f8d7d7; }

/* ---------------- 通用 ---------------- */

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 14px;
}

.card h2 { font-size: 16px; color: var(--ink); margin-bottom: 5px; }

.home-greet { color: var(--ink-3); font-size: 13px; margin-bottom: 6px; }

.placeholder {
    text-align: center;
    padding: 28px 10px;
    color: var(--ink-3);
}

.placeholder-icon { font-size: 44px; margin-bottom: 8px; }

.home-footer {
    text-align: center;
    color: var(--ink-3);
    font-size: 11px;
    padding: 8px 0 12px;
}

/* ---------------- 电脑端微调 ---------------- */

@media (min-width: 600px) {
    .auth-card { padding: 26px 24px 20px; }
}