/* =====================================================================
   魔方办公 · 组件样式（星座 / 背单词 / 句子 / dock / 弹层）
   ===================================================================== */

/* 磁贴名称统一白字 + 深色胶囊（浅底卡片在深色背景上同样清晰） */
.t-constellation .tile-label, .t-word .tile-label,
.flip-face .tile-label {
    color: #fff; background: rgba(12, 22, 38, .5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

/* 星座 */
.t-constellation {
    grid-column: span 4; grid-row: span 2;
    background: linear-gradient(140deg, #cfe9f7 0%, #dff2ef 55%, #eef6ff 100%);
    padding: 7px 10px 8px; display: flex; flex-direction: column; gap: 3px;
}
.cx-head { display: flex; align-items: center; justify-content: space-between; }
.cx-name { font-size: .86em; font-weight: 700; color: #2b3648; display: flex; align-items: center; gap: 4px; }
.cx-name em { font-style: normal; font-size: .72em; font-weight: 400; color: #7d8899; }
.cx-date { font-size: .71em; color: #8494a8; }
.cx-sum {
    font-size: .78em; color: #3b4a5e; line-height: 1.45;
    background: rgba(255, 255, 255, .62); border-radius: 6px; padding: 4px 7px;
    min-height: 1.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cx-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-top: 0; }
.cx-bar { display: flex; align-items: center; gap: 5px; font-size: .71em; color: #5b6b80; }
.cx-bar .cb-k { flex: 0 0 20px; }
.cx-bar .cb-t { flex: 1; height: 4px; background: #dbe6ef; border-radius: 3px; overflow: hidden; }
.cx-bar .cb-t i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6ec1f0, #4a9fe0); border-radius: 3px; }
.cx-bar .cb-v { flex: 0 0 18px; text-align: right; color: #8ea0b4; }
.cx-foot { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.cx-period { display: flex; gap: 1px; background: rgba(255, 255, 255, .55); border-radius: 5px; padding: 1px; }
.cx-period button {
    border: 0; background: transparent; font-size: .71em; color: #6b7c92;
    padding: 2px 6px; border-radius: 4px; cursor: pointer;
}
.cx-period button.on { background: #fff; color: #2b3648; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.cx-change {
    margin-left: auto; border: 0; background: transparent; color: #5b7ea8;
    font-size: .71em; cursor: pointer; text-decoration: underline; padding: 0;
}
.cx-gear { border: 0; background: transparent; color: #7d8899; cursor: pointer; padding: 0 2px; }

/* 背单词 */
.t-word {
    grid-column: span 4; grid-row: span 2;
    background: linear-gradient(140deg, #fdf6ec 0%, #fbf1e4 60%, #f7e9d6 100%);
    padding: 7px 10px 8px; display: flex; flex-direction: column; gap: 2px;
}
.wd-head { display: flex; align-items: center; justify-content: space-between; font-size: .71em; color: #7d6142; font-weight: 500; }
.wd-cells { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; min-height: 1.6em; align-items: center; }
.wd-cell {
    width: 1.5em; height: 1.65em; border-radius: 4px; background: #fff;
    border: 1px solid #e8d9c4; display: flex; align-items: center; justify-content: center;
    font-size: .78em; font-weight: 700; color: #7a6244; text-transform: lowercase;
}
.wd-cell.plain { width: auto; padding: 0 6px; font-size: .75em; font-weight: 400; letter-spacing: .5px; }
.wd-word { text-align: center; font-size: .93em; font-weight: 700; color: #6b4e2a; letter-spacing: .3px; line-height: 1.15; }
.wd-meaning { text-align: center; font-size: .75em; color: #8a7357; min-height: .9em; line-height: 1.25; }
.wd-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.wd-btn {
    flex: 1; height: 1.5em; border: 1px solid #e8d9c4; background: #fff;
    border-radius: 6px; font-size: .75em; color: #8a7357; cursor: pointer;
}
.wd-btn:hover { background: #fffaf2; }

/* 句子（按参考图：紫色渐变 + 右上笑脸水印 + 左下大引号 + 居中文字 + 底部三图标） */
.t-sentence {
    /* 名字标签在卡片外侧下方，不能裁切；z-index 保证浮在下一行磁贴之上 */
    grid-column: span 2; grid-row: span 2; position: relative; z-index: 3;
    background: linear-gradient(150deg, #a98ae0 0%, #b9a1e9 46%, #c8b5f0 100%);
    color: #fff; padding: 11px 12px 32px;
    display: flex; flex-direction: column; gap: 3px; cursor: pointer;
    box-shadow: 0 8px 22px rgba(120, 90, 200, .30);
}
/* 右上角笑脸水印 */
.sent-smile {
    position: absolute; right: -9%; top: -8%; width: 46%; height: 46%;
    pointer-events: none; opacity: .16;
}
.sent-smile svg { width: 100%; height: 100%; display: block; }
/* 左下大引号：半透明压在文字下方 */
.sent-mark {
    position: absolute; left: 5%; bottom: 16%; font-size: 3.3em; line-height: 1;
    opacity: .24; pointer-events: none;
}
.sent-text {
    position: relative; z-index: 1; flex: 1; min-height: 0;
    font-size: .86em; line-height: 1.45; opacity: .98;
    text-align: center; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    transition: opacity .18s ease;
}
.sent-from {
    position: relative; z-index: 1; flex: 0 0 auto;
    font-size: .7em; opacity: 1; color: rgba(255, 255, 255, .94);
    text-align: right; margin-top: 1px; text-shadow: 0 1px 2px rgba(60, 40, 110, .35);
}
.t-sentence.sent-loading .sent-text { opacity: .45; }
/* 底部图标行：复制 / 搜索 / 换一句 */
.sent-actions {
    position: absolute; left: 0; right: 0; bottom: .85em; z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 2em;
}
.sent-act {
    width: 1.95em; height: 1.95em; padding: 0; border: 0; border-radius: .5em;
    background: transparent; color: rgba(255, 255, 255, .92); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .12s, color .15s;
}
.sent-act svg { width: 1.45em; height: 1.45em; display: block; }
.sent-act:hover { background: rgba(255, 255, 255, .18); }
.sent-act:active { transform: scale(.92); }
.sent-act.ok { color: #d4ffe2; background: rgba(255, 255, 255, .26); }

/* 添加磁贴：按源站做成一个图标（不是大胶囊卡） */
.t-add {
    grid-column: span 2; grid-row: span 2;
    background: transparent; border: 0; box-shadow: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer;
}
.t-add:hover { background: transparent; }
.t-add .add-icon {
    width: 62px; height: 62px; border-radius: 15px;
    background: linear-gradient(150deg, #ff8fb1, #ff4d6d);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 400; line-height: 1;
    box-shadow: 0 6px 16px rgba(255, 77, 109, .34);
    transition: transform .16s cubic-bezier(.34, 1.3, .64, 1), box-shadow .16s;
}
.t-add:hover .add-icon { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 22px rgba(255, 77, 109, .42); }
.t-add .add-icon:active { transform: scale(.95); }

/* ---- 喝水 / 休息 加减号样式见 main.css（半嵌左右边缘的圆钮） ---- */

/* ---- 1.1.0：背景选择器分组 ---- */
.bg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bg-item { height: 68px; border-radius: 10px; font-size: 10.5px; padding: 6px; }
.bg-item .bg-tag {
    position: relative; z-index: 2; display: block; max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bg-section { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.bg-section-title { font-size: 12.5px; color: #4b5563; font-weight: 600; }
.bg-section-note { font-size: 11px; color: #a7b0bd; }
.bg-grid.daily .bg-item { background-color: #dde3ec; background-size: cover; background-position: center; }
.bg-grid.daily .bg-item::after { background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 55%); }
.bg-daily-wrap { position: relative; }
.bg-loading { font-size: 12px; color: #98a0ad; padding: 14px 2px; }

/* dock —— 对齐原版：半透明胶囊条，左侧竖排“推荐网站”胶囊，图标 56×56，右侧“最近点击”保留 2 个
   尺寸全部乘以 --dock-scale（由 layoutGrid 按卡片实际大小实时写入 → 大屏等比放大） */
.dock {
    position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
    z-index: 25; display: flex; align-items: center; gap: calc(6px * var(--dock-scale, 1));
    padding: calc(5px * var(--dock-scale, 1)) calc(8px * var(--dock-scale, 1));
    border-radius: calc(14px * var(--dock-scale, 1));
    background: rgba(0, 0, 0, .34);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    max-width: calc(100vw - 40px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.dock::-webkit-scrollbar { height: 0; width: 0; display: none; }
.dock-label {
    writing-mode: vertical-rl;
    font-size: calc(9.5px * var(--dock-scale, 1));
    color: rgba(255, 255, 255, .66);
    letter-spacing: calc(1.2px * var(--dock-scale, 1)); line-height: 1.25;
    width: calc(23px * var(--dock-scale, 1)); height: calc(46px * var(--dock-scale, 1));
    border-radius: calc(11px * var(--dock-scale, 1));
    background: rgba(255, 255, 255, .12);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto; user-select: none;
}
.dock-items {
    display: flex; align-items: center; gap: calc(6px * var(--dock-scale, 1)); padding: 0;
    overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto;
}
.dock-items::-webkit-scrollbar { height: 0; width: 0; display: none; }
.dock-recent { display: flex; align-items: center; gap: calc(6px * var(--dock-scale, 1)); flex: 0 0 auto; }
.dock-recent:empty { display: none; }
.dock-sep { width: 1px; height: calc(26px * var(--dock-scale, 1)); background: rgba(255, 255, 255, .16); flex: 0 0 auto; }
/* 图标直接贴在胶囊上：不要白底白边，只有图标本身；圆角由「设置-图标圆角」控制 */
.dock-item {
    width: calc(46px * var(--dock-scale, 1)); height: calc(46px * var(--dock-scale, 1));
    border-radius: calc(var(--icon-radius, 14px) * var(--dock-scale, 1));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: transform .18s cubic-bezier(.34, 1.3, .64, 1), box-shadow .18s ease;
    flex: 0 0 auto; background: transparent; box-shadow: none;
}
.dock-item:hover { transform: translateY(calc(-3px * var(--dock-scale, 1))) scale(1.06); box-shadow: none; }
.dock-item img {
    width: 100%; height: 100%; object-fit: contain; display: block;
    border-radius: calc(var(--icon-radius, 14px) * var(--dock-scale, 1));
}
.dock-item .ph {
    width: 100%; height: 100%;
    border-radius: calc(var(--icon-radius, 14px) * var(--dock-scale, 1));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: calc(16px * var(--dock-scale, 1)); background: rgba(255, 255, 255, .18);
}
.dock-item:hover { animation: icoJump .46s cubic-bezier(.34, 1.56, .64, 1) both; }
.dock-hide {
    border: 0; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .72);
    font-size: calc(10px * var(--dock-scale, 1));
    height: calc(26px * var(--dock-scale, 1)); padding: 0 calc(8px * var(--dock-scale, 1));
    border-radius: calc(6px * var(--dock-scale, 1)); cursor: pointer;
    flex: 0 0 auto;
}
.dock-hide:hover { background: rgba(255, 255, 255, .22); }
.dock.min { padding: calc(6px * var(--dock-scale, 1)) calc(10px * var(--dock-scale, 1)); }
.dock.min .dock-items,
.dock.min .dock-recent,
.dock.min .dock-sep { display: none; }
.dock.min .dock-label {
    writing-mode: horizontal-tb; width: auto;
    height: calc(22px * var(--dock-scale, 1));
    padding: calc(2px * var(--dock-scale, 1)) calc(8px * var(--dock-scale, 1));
    letter-spacing: 1px;
}
.dock.min .dock-label-recent { display: none; }

/* 弹层 */
.modal-layer {
    position: fixed; inset: 0; z-index: 2000; display: none;
    align-items: center; justify-content: center;
    background: rgba(12, 16, 24, .5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    padding: 20px;
}
.modal-layer.on { display: flex; }
.modal {
    background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
    width: 560px; max-width: 100%; max-height: 86vh;
    display: flex; flex-direction: column; overflow: hidden;
    animation: pop .22s cubic-bezier(.2, .9, .3, 1);
}
.modal.wide { width: 720px; }
@keyframes pop { from { transform: scale(.94); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 12px; border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close {
    border: 0; background: rgba(0, 0, 0, .04); width: 28px; height: 28px;
    border-radius: 8px; cursor: pointer; color: #6b7280; font-size: 15px;
}
.modal-close:hover { background: rgba(0, 0, 0, .08); }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* 分类站点 */
.cat-add { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #eef1f6); }
.cat-add[hidden] { display: none; }
.cat-add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-add-row .ca-inp {
    flex: 1 1 160px; min-width: 0; height: 38px; padding: 0 12px;
    border: 1px solid #e5e9f0; border-radius: 9px; font-size: 13px; color: #374151; background: #fff;
}
.cat-add-row .ca-inp:focus { outline: none; border-color: var(--accent, #4a7cf7); box-shadow: 0 0 0 3px rgba(74, 124, 247, .12); }
.cat-add-act { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cat-add-act .ca-tip { margin-right: auto; font-size: 12px; color: #9aa4b2; }
.cat-sort-tip { font-size: 12px; color: #9aa4b2; margin: 0 0 10px 2px; }
.cat-sites { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-site {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 14px 8px; border-radius: 12px; text-decoration: none;
    transition: .14s; color: #374151;
    cursor: grab; user-select: none; -webkit-user-select: none;
    touch-action: none;
}
.cat-site:hover { background: #f5f8ff; }
.cat-site.dragging { opacity: .5; cursor: grabbing; }
.cat-site.drop-target {
    background: #eef4ff; outline: 2px dashed var(--accent, #4a7cf7);
    outline-offset: 1px;
}
.cat-site .cs-icon {
    width: 46px; height: 46px; border-radius: 12px; background: transparent;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cat-site .cs-icon img { width: 92%; height: 92%; object-fit: contain; }
.cat-site .cs-icon .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.cat-site .cs-name { font-size: 12.5px; text-align: center; }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12.5px; color: #6b7280; margin-bottom: 6px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=email], .form-row select {
    width: 100%; height: 40px; border: 1px solid #e5e9f0; border-radius: 9px;
    padding: 0 12px; font-size: 14px; outline: 0; background: #fff; color: #111827;
}
.form-row input:focus, .form-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74, 124, 247, .12); }
.btn-primary {
    height: 40px; padding: 0 22px; border: 0; border-radius: 9px;
    background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: #3a6ae0; }
.btn-ghost {
    height: 40px; padding: 0 18px; border: 1px solid #e5e9f0; border-radius: 9px;
    background: #fff; color: #6b7280; font-size: 14px; cursor: pointer;
}
.tip { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.msg { font-size: 13px; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; display: none; }
.msg.err { display: block; background: #fdeaea; color: #d64545; }
.msg.ok { display: block; background: #e9f8ef; color: #1a9d5b; }

/* 城市 */
.city-cur { font-size: 13px; color: #8a94a6; margin: -4px 0 12px; }
.city-cur b { color: #0f172a; font-weight: 600; font-size: 13.5px; }
.city-cur em { font-style: normal; }
.city-acts { display: flex; gap: 10px; margin-bottom: 12px; }
.city-act {
    flex: 1; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid #e5e9f0; border-radius: 9px; background: #fff;
    font-size: 13px; font-family: inherit; color: #334155; cursor: pointer; transition: .14s;
}
.city-act span { font-size: 14px; line-height: 1; }
.city-act:hover { border-color: #16a34a; color: #15803d; background: #f6fef9; }
.city-act:disabled { opacity: .6; cursor: default; }
.city-search { display: flex; gap: 8px; margin-bottom: 12px; }
.city-search input { flex: 1; height: 40px; border: 1px solid #e5e9f0; border-radius: 9px; padding: 0 12px; font-size: 14px; outline: 0; font-family: inherit; }
.city-search input:focus { border-color: #16a34a; }
.city-search button { height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: #16a34a; color: #fff; cursor: pointer; font-family: inherit; font-size: 13.5px; }
.city-search button:hover { background: #15803d; }
.city-quick { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.cq-label { font-size: 12.5px; color: #8a94a6; margin-right: 2px; }
.city-chip {
    height: 32px; padding: 0 12px; border: 1px solid #eef1f6; background: #f4f6fa;
    border-radius: 8px; font-size: 12.5px; color: #475569; cursor: pointer; font-family: inherit; transition: .14s;
}
.city-chip:hover { border-color: #16a34a; color: #15803d; background: #fff; }
.city-chip.on { background: #dcfce7; border-color: #86efac; color: #15803d; font-weight: 600; }
.city-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.city-list a {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    border-radius: 8px; text-decoration: none; color: #374151; font-size: 13.5px;
}
.city-list a:hover { background: #f4f7fd; }
.city-list a span { color: #98a0ad; font-size: 12px; margin-left: auto; }

/* 星座选择 */
.sign-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sign-item {
    padding: 12px 8px; border-radius: 10px; border: 1px solid #eef1f6;
    text-align: center; cursor: pointer; transition: .14s;
}
.sign-item:hover { border-color: var(--accent); background: #f7faff; }
.sign-item.on { border-color: var(--accent); background: #eef4ff; }
.sign-item b { display: block; font-size: 13px; color: #2b3648; margin-bottom: 3px; }
.sign-item span { font-size: 11px; color: #98a0ad; }

/* 背景选择 */
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bg-item {
    height: 84px; border-radius: 10px; cursor: pointer;
    border: 2px solid transparent; position: relative; overflow: hidden;
    display: flex; align-items: flex-end; padding: 8px;
    font-size: 11.5px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.bg-item.on { border-color: var(--accent); }
.bg-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .38), transparent 60%);
}
.bg-item span { position: relative; z-index: 2; }
.bg-preview {
    height: 120px; border-radius: 12px; margin-bottom: 14px;
    background-size: cover; background-position: center;
}

/* 背景选择：图片类走 16:9 封面网格，分类标签横排 */
.bg-grid.pics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bg-item.pic {
    height: 0; padding-bottom: 56.25%; padding-left: 0; padding-right: 0; padding-top: 0;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.bg-item.pic::after { background: linear-gradient(to top, rgba(0, 0, 0, .3), transparent 60%); }
.bg-item.pic:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 23, 42, .22); }
.bg-item::after { pointer-events: none; }
.bg-item { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.bg-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.bg-cat-tab {
    font-size: 12px; padding: 5px 13px; border-radius: 999px; cursor: pointer;
    background: rgba(15, 23, 42, .06); color: #4b5563; transition: .15s; user-select: none;
}
.bg-cat-tab:hover { background: rgba(15, 23, 42, .12); }
.bg-cat-tab.on { background: var(--accent); color: #fff; font-weight: 600; }

/* 设置 */
.set-list { display: flex; flex-direction: column; gap: 2px; }
.set-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; border-radius: 9px; font-size: 13.5px; color: #374151;
}
.set-item:hover { background: #f7f9fc; }
.set-item .si-k { display: flex; align-items: center; gap: 10px; }
.set-item .si-k i { font-style: normal; font-size: 15px; }
.switch {
    width: 42px; height: 24px; border-radius: 999px; background: #dfe3ea;
    position: relative; cursor: pointer; transition: .18s; flex: 0 0 auto;
}
.switch.on { background: var(--accent); }
.switch::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; transition: .18s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch.on::after { left: 21px; }

/* 空态与提示 */
.empty-tip { text-align: center; color: #98a0ad; font-size: 13px; padding: 26px 0; }
.toast {
    position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(10px);
    background: rgba(20, 24, 33, .88); color: #fff; font-size: 13px;
    padding: 10px 18px; border-radius: 10px; z-index: 200; opacity: 0;
    transition: .2s; pointer-events: none; max-width: 80vw;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 天气详情 */
.wd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wd-table th { color: #98a0ad; font-weight: 400; text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.wd-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); color: #374151; }
.wd-table tr:last-child td { border-bottom: 0; }

/* 响应式（网格列数统一交给 main.css + JS layoutGrid 自适应，此处不再覆盖 .grid 的列定义） */
@media (max-width: 1240px) {
    .side-nav { width: 50px; }
    .sn-item { width: 42px; height: 46px; font-size: 10px; }
}
@media (max-width: 820px) {
    .topbar { flex-wrap: wrap; padding: 16px 12px 6px; }
    .tb-left { flex: 1 0 100%; }
    .tb-mid { order: 3; flex: 1 0 100%; margin-top: 8px; }
    .tb-right { order: 2; margin-left: auto; }
    .clock { font-size: 30px; }
    .t-punch, .t-constellation, .t-word { grid-column: span 4; }
    .side-nav { display: none; }
    .dock { left: 8px; right: 8px; transform: none; width: auto; max-width: none; }
    .cat-sites { grid-template-columns: repeat(3, 1fr); }
}

/* ---- 番茄历史 / 每日报表 ---- */
.pomo-report { font-size: 13px; color: #374151; }
.pr-loading { padding: 26px 0; text-align: center; color: #9aa4b2; font-size: 13px; }
.pr-loading.small { padding: 10px 0; font-size: 12px; }
.pr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.pr-range { display: flex; gap: 6px; background: #f2f4f8; border-radius: 999px; padding: 4px; }
.pr-range button {
    border: 0; background: transparent; border-radius: 999px; padding: 6px 14px;
    font-size: 12.5px; color: #6b7280; cursor: pointer; transition: .15s;
}
.pr-range button.on { background: #fff; color: #1b1b1b; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.pr-span { font-size: 12px; color: #9aa4b2; }
.pr-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.pr-card { background: #f7f9fc; border: 1px solid #eef1f6; border-radius: 12px; padding: 12px 14px; }
.pr-card span { display: block; font-size: 12px; color: #8b94a3; margin-bottom: 6px; }
.pr-card b { font-size: 19px; font-weight: 800; color: #141414; letter-spacing: -.01em; }
.pr-card b i { font-style: normal; font-size: 11.5px; font-weight: 500; color: #8b94a3; margin-left: 3px; }
.pr-chart { border: 1px solid #eef1f6; border-radius: 12px; padding: 12px 14px 6px; margin-bottom: 14px; }
.pr-chart-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #8b94a3; margin-bottom: 10px; }
.pr-chart-head em { font-style: normal; }
.pr-bars { display: flex; align-items: flex-end; gap: 4px; height: 88px; }
.pr-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.pr-bar i { display: block; width: 70%; max-width: 16px; background: #c7d4ea; border-radius: 3px 3px 0 0; min-height: 2px; }
.pr-bar.today i { background: #ef4b4b; }
.pr-bar span { font-size: 10px; color: #a5adba; margin-top: 4px; height: 12px; }
.pr-table { width: 100%; border-collapse: collapse; }
.pr-table th { text-align: left; font-size: 12px; color: #8b94a3; font-weight: 500; padding: 6px 8px; border-bottom: 1px solid #eff2f6; }
.pr-table td { padding: 9px 8px; font-size: 12.5px; border-bottom: 1px solid #f4f6fa; }
.pr-row { cursor: pointer; }
.pr-row:hover td { background: #f8fafd; }
.pr-date i { font-style: normal; color: #a5adba; margin-left: 4px; }
.pr-date b { background: #feeaea; color: #e04545; font-size: 10px; font-weight: 600; border-radius: 4px; padding: 1px 4px; margin-left: 6px; }
.pr-num { font-weight: 700; }
.pr-more { color: #9aa4b2; text-align: right; font-size: 12px; }
.pr-detail-row td { padding: 0; background: #fbfcfe; }
.pr-detail { padding: 8px 10px; }
.pr-detail-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-detail-item { display: flex; align-items: center; gap: 6px; font-size: 12px; background: #fff; border: 1px solid #eef1f6; border-radius: 8px; padding: 4px 8px; }
.pr-detail-item .pr-time { color: #8b94a3; }
.pr-detail-item .pr-kind { font-weight: 600; }
.pr-detail-item.kind-focus .pr-kind { color: #e04545; }
.pr-detail-item.kind-short .pr-kind { color: #31a869; }
.pr-detail-item.kind-long .pr-kind { color: #2b71e4; }
.pr-detail-item .pr-min { color: #8b94a3; }
.pr-empty { text-align: center; color: #9aa4b2; padding: 18px 0; }

@media (max-width: 760px) {
    .pr-cards { grid-template-columns: repeat(3, 1fr); }
    .pr-card b { font-size: 17px; }
    .pr-top { flex-wrap: wrap; }
}
@media (max-width: 520px) {
    .pr-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .pr-card { padding: 10px 12px; }
    .pr-chart-head { flex-direction: column; gap: 4px; }
    .pr-table th:nth-child(4), .pr-table td:nth-child(4),
    .pr-table th:nth-child(5), .pr-table td:nth-child(5) { display: none; }
    .pr-bar span { font-size: 9px; }
}

/* ---- 自动重命名软件（首页组件） ---- */
.t-software { display: flex; align-items: stretch; }
.t-software .sw-box {
    display: flex; flex-direction: column; justify-content: center;
    width: 100%; padding: 10px 13px 4px; gap: 3px; color: #24303f;
}
.t-software .sw-top { display: flex; align-items: center; gap: 9px; }
.t-software .sw-ic {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    background: linear-gradient(140deg, #4a7cf7, #6ea6ff); color: #fff;
    box-shadow: 0 2px 6px rgba(74, 124, 247, .32);
}
.t-software .sw-tt { min-width: 0; }
.t-software .sw-name { font-size: .92em; font-weight: 700; line-height: 1.2; }
.t-software .sw-sub { font-size: .72em; color: #7b8698; margin-top: 1px; }
.t-software .sw-ver { font-size: 1.35em; font-weight: 700; letter-spacing: .3px; margin-top: 2px; }
.t-software .sw-meta {
    font-size: .72em; color: #7b8698; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-software .sw-foot { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.t-software .sw-dl {
    border: 0; border-radius: 7px; padding: 4px 10px; font-size: .72em; font-weight: 600; white-space: nowrap;
    color: #fff; background: #2b6cff; cursor: pointer;
}
.t-software .sw-dl:hover { background: #1d5cef; }
.t-software .sw-dl:disabled { background: #c9d2e0; cursor: default; }
.t-software .sw-more { font-size: .72em; color: #2b6cff; cursor: pointer; }
.t-software .tile-label { color: #fff; background: rgba(12, 22, 38, .5); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }


