/* ============================================================
   css/panels/panels-calendar-builder.css 鈥?銆屾柊澧炴棩绋嬨€嶆嫾鍥惧ぇ鐣岄潰
   璁捐: 娓呮柊闊╃郴 脳 娉曞紡鑺辫壓 鈥?鍑归櫡閾佺洅 / 鎷煎浘褰㈢姸 / 绾告潯澶氶€?   涓婚鍙橀噺鍏ㄩ儴璧?core.css 浠ょ墝锛岃窡闅忔祬/鏆椾富棰橈紱涓绘寜閽敤 --rose-dark 娣辩帿鐟帮紱
   鏃?emoji/娓愬彉鎸夐挳/渚ц竟鏉＄汗/娓愬彉鏂囧瓧锛汼VG 绾挎潯鍥炬爣锛涜‖绾胯姳瀛椾粎瑁呴グ銆?   ============================================================ */

/* ===== 婊″睆鎿嶄綔鍙帮紙鎸?#app锛宱pen=hidden鎻掑叆鈫抮AF .show锛宑lose=娣″嚭锛?===== */
.nsb-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    z-index: 1660;
    opacity: 0;
    transition: opacity 0.24s ease;
    --nsb-box-bg: var(--surface-solid);   /* 閾佺洅鍐呭簳鑹诧紙闅忎富棰橈級锛屾嫾鍥惧嚬妲界敤瀹冩寲绌?*/
}
.nsb-overlay.show { opacity: 1; animation: nsbFadeIn 0.26s ease; }
@keyframes nsbFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 杩斿洖澶达紙绱у噾锛屾棤鑻辨枃锛?*/
.nsb-head {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 6px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-faint);
}
.nsb-head-title { font-family: var(--font-reading); font-weight: 600; font-size: 15px; letter-spacing: 0.14em; color: var(--text-secondary); }
.nsb-back-btn {
    width: 32px; height: 32px; border: none; background: transparent;
    border-radius: 50%; color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.14s ease;
}
.nsb-back-btn:hover { background: var(--accent-light); color: var(--accent); }
.nsb-back-btn:active { transform: scale(0.9); }

/* 涓讳綋 */
.nsb-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 10px 12px; gap: 8px; overflow-y: auto; overflow-x: hidden; }
.nsb-body::-webkit-scrollbar { display: none; }

/* ===== 涓婂崐閮細宸?鏃ュ巻+鍨冨溇妗? + 鍙?娓呭崟) ===== */
.nsb-top { flex: 1; min-height: 0; display: flex; gap: 8px; }
.nsb-left { flex: 0 0 40%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.nsb-right { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }

/* ---- 鏃ュ巻锛堢豢鍖猴級 ---- */
.nsb-cal {
    flex: 0 0 auto;
    background: var(--surface-solid); border-radius: var(--radius-lg);
    padding: 6px 8px 8px; box-shadow: var(--shadow-xs), var(--shadow-sm);
}
.nsb-cal-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 6px; }
.nsb-cal-title { font-size: 11px; color: var(--text-muted); letter-spacing: 0.02em; line-height: 1.1; white-space: nowrap; min-width: 0; }
.nsb-cal-title b { font-family: var(--font-reading); font-size: 14px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.02em; }
.nsb-cal-title-en { font-family: var(--font-script); font-size: 10px; color: var(--accent); opacity: 0.7; margin-left: 4px; }
.nsb-cal-nav { display: flex; gap: 3px; flex-shrink: 0; }
.nsb-cal-nav button {
    width: 24px; height: 24px; border: 1px solid var(--border); background: var(--surface-solid);
    border-radius: 50%; color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}
.nsb-cal-nav button:hover { border-color: var(--accent); color: var(--accent); }
.nsb-cal-nav button:active { transform: scale(0.9); }
.nsb-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 1px 0 3px; }
.nsb-wd { text-align: center; font-size: 10px; color: var(--text-muted); letter-spacing: 0.02em; }
.nsb-wd:first-child, .nsb-wd:last-child { color: var(--accent); }
.nsb-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.nsb-day {
    position: relative; height: 25px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--text-secondary); cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.nsb-day:hover { background: var(--accent-light); }
.nsb-day:active { transform: scale(0.88); }
.nsb-day.empty { cursor: default; }
.nsb-day.today .nsb-day-num { color: var(--accent); font-weight: 700; }
.nsb-day.selected { background: var(--accent); color: #FCFAF6; box-shadow: var(--shadow-sm); }
.nsb-day.selected .nsb-day-num { color: #FCFAF6; }

/* ---- 鍨冨溇妗讹紙钃濆尯锛屽共鍑€灏忔《锛屽～婊″乏鍒楀墿浣欑┖闂达級 ---- */
.nsb-trash {
    flex: 1; min-height: 92px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-solid); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs), var(--shadow-sm);
    position: relative; transition: box-shadow 0.2s ease;
}
.nsb-trash-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nsb-trash-lid { width: 36px; height: 6px; border-radius: 4px; background: var(--accent); transform-origin: right center; transition: transform 0.28s cubic-bezier(0.22,0.61,0.36,1); }
.nsb-trash-body { width: 26px; height: 24px; border-radius: 2px 2px 5px 5px; background: var(--accent); position: relative; box-shadow: var(--shadow-xs); }
.nsb-trash-body::after { content: ''; position: absolute; top: -3px; left: 50%; transform: translateX(-50%); width: 16px; height: 3px; border-radius: 3px; background: var(--accent); opacity: 0.55; }
.nsb-trash-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.12em; }
.nsb-trash.nsb-trash-lit .nsb-trash-lid { transform: rotate(45deg); }
.nsb-trash.nsb-trash-lit .nsb-trash-label { color: var(--accent); }
.nsb-trash.nsb-trash-lit { box-shadow: 0 0 0 2px var(--accent-light), var(--shadow-sm); }

/* ---- 娓呭崟锛堥粍鍖猴級 ---- */
.nsb-list {
    flex: 1; min-height: 0;
    background: var(--surface-solid); border-radius: var(--radius-lg);
    padding: 8px; overflow-y: auto; box-shadow: var(--shadow-xs), var(--shadow-sm);
    scrollbar-width: none; -ms-overflow-style: none;
}
.nsb-list::-webkit-scrollbar { display: none; }
.nsb-list-head { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 2px 8px; }
.nsb-list-date { font-family: var(--font-reading); font-size: 14px; color: var(--text-secondary); letter-spacing: 0.02em; }
.nsb-list-count { font-size: 11px; color: var(--text-muted); }
.nsb-list-body { display: flex; flex-direction: column; gap: 6px; }
.nsb-list-empty { text-align: center; padding: 24px 0; }
.nsb-list-empty .nsb-le-en { font-family: var(--font-script); font-size: 22px; color: var(--accent); opacity: 0.7; }
.nsb-list-empty .nsb-le-zh { margin-top: 4px; color: var(--text-muted); font-size: 12px; }

/* 娓呭崟琛岋紙鏌斿拰锛屽皯绾粦锛?*/
.nsb-row {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 7px; border-radius: var(--radius-md);
    background: var(--input-bg);
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
    cursor: grab; user-select: none; touch-action: pan-y;
}
.nsb-row:hover { background: var(--card-bg); box-shadow: var(--shadow-xs); }
.nsb-row:active { transform: scale(0.985); }
.nsb-row.dragging { opacity: 0.45; cursor: grabbing; }
/* 清单跟手拖拽：被拖行半透明占位（保布局），浮动克隆抬升跟手 */
.nsb-row.nsb-vl-src { opacity: 0.35; cursor: grabbing; }
.nsb-vl-clone { box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); border-radius: var(--radius-md); opacity: 0.97; will-change: transform; }
.nsb-row.done .nsb-row-title span, .nsb-row-fail .nsb-row-title span { text-decoration: line-through; color: var(--text-muted); }
.nsb-row .nsb-row-swatch { flex: 0 0 auto; width: 11px; height: 11px; border-radius: var(--radius-xs); background: var(--c, var(--text-muted)); opacity: 0.92; margin-right: 5px; }
.nsb-row-title { display: flex; align-items: center; font-size: 12px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nsb-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nsb-row-time { font-size: 11px; color: var(--text-secondary); margin-top: 1px; white-space: nowrap; }
.nsb-row-actions { flex: 0 0 auto; display: flex; gap: 2px; }
/* 状态圈：灰色空心=未完成（单击切换，长按删除）；完成=填充对勾 */
.nsb-row-status {
    width: 26px; height: 26px; border: 2px solid var(--border); border-radius: 50%;
    background: transparent; color: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.nsb-row-status:hover { border-color: var(--accent); }
.nsb-row-status:active { transform: scale(0.86); }
.nsb-row-status.is-done { background: var(--sage); border-color: var(--sage); color: #FCFAF6; }
.nsb-row-status.is-fail { border-color: var(--accent-rose); color: var(--accent-rose); }
.nsb-row-status.confirming { border-color: var(--accent); color: var(--accent); transform: scale(1.08); }

/* ===== 褰撴棩鐩掞紙姗欏尯锛夛細鍑归櫡鐭搧鐩掞紝鏁ｈ惤瀹瑰櫒 + 澶氶€夌焊鏉?===== */
.nsb-daybox {
    flex: 0 0 auto; height: 132px;
    background: var(--surface-solid); border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 3px 9px rgba(30,24,20,0.09), inset 0 -1px 0 rgba(255,255,255,0.6), var(--shadow-xs);
    position: relative; overflow: hidden; padding: 6px;   /* ★ 裁切散落超出盒子的拼图——甲方 2026-09 */
}
.nsb-daybox-tag { position: absolute; top: 9px; left: 11px; z-index: 3; font-size: 10px; letter-spacing: 0.16em; color: var(--text-secondary); display: flex; align-items: center; }
.nsb-daybox-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.nsb-daybox-tag::after { content: ''; width: 30px; height: 1px; background: var(--gold); opacity: 0.4; margin-left: 7px; }
.nsb-daybox-field { position: absolute; inset: 28px 8px 8px 8px; z-index: 2; overflow: hidden; }
.nsb-daybox-field .nsb-piece { position: absolute; }
.nsb-daybox-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; }
/* 多选签：左尖头旗形（点左、右侧矩形），放盒子上面，拉出滑开多选界面 */
.nsb-daybox-pull {
    position: absolute; right: -8px; top: -14px; z-index: 15;
    height: 34px; width: 118px;
    background: var(--accent); color: #FCFAF6;
    clip-path: polygon(0 50%, 15% 0, 100% 0, 100% 100%, 15% 100%);
    display: flex; align-items: center; justify-content: flex-start; padding-left: 24px;
    font-size: 12px; letter-spacing: 0.02em; white-space: nowrap;
    box-shadow: -3px 3px 8px rgba(160,145,130,0.20);
    cursor: grab; touch-action: none; user-select: none;
    transition: background 0.2s ease;
}
.nsb-daybox-pull:hover { background: var(--accent-hover); }

/* ===== 搴曢儴锛氭殏瀛樼洅锛堢孩鍖猴紝鍑归櫡閾佺洅 + 棰勮閾佺洅鍦ㄥ彸锛?===== */
.nsb-stash-zone { flex: 0 0 auto; height: 232px; position: relative; }
.nsb-stash {
    position: absolute; inset: 0; z-index: 1;
    background: var(--surface-solid); border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 3px 9px rgba(30,24,20,0.09), inset 0 -1px 0 rgba(255,255,255,0.6), var(--shadow-xs);
    display: flex; flex-direction: column; overflow: hidden;
}
/* 鏍囬锛堝乏锛屼笌褰撴棩鐩掓爣绛惧悓椋庢牸锛? 鎿嶄綔鎸夐挳锛堝彸锛?*/
.nsb-stash-actions { position: relative; z-index: 3; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 44px 4px 12px; }
.nsb-stash-title { font-size: 10px; letter-spacing: 0.16em; color: var(--text-secondary); display: flex; align-items: center; }
.nsb-stash-title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.nsb-action-btn {
    border: 1px solid var(--border); background: var(--surface-solid); border-radius: var(--radius-full);
    height: 28px; padding: 0 11px; cursor: pointer;
    font-family: inherit; font-size: 11.5px; color: var(--text-secondary);
    display: inline-flex; align-items: center; gap: 4px;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.nsb-action-btn:hover { color: var(--accent); border-color: var(--accent); }
.nsb-action-btn:active { transform: scale(0.94); }
.nsb-action-btn.primary { background: var(--accent); color: #FCFAF6; border-color: transparent; box-shadow: var(--shadow-sm); }
.nsb-action-btn.primary:hover { background: var(--accent-hover); color: #FCFAF6; }
.nsb-action-btn.active { background: var(--accent); color: #FCFAF6; border-color: transparent; }
.nsb-stash-actions .nsb-spacer { flex: 1; }
/* 鍑归櫡鏆傚瓨瀛楁 */
.nsb-stash-field { position: relative; z-index: 2; flex: 1; min-height: 0; overflow: hidden; margin: 4px 10px 12px; }
.nsb-stash-field .nsb-piece { position: absolute; }
.nsb-stash-field.arranged { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; overflow-y: auto; scrollbar-width: none; padding: 2px; }
.nsb-stash-field.arranged::-webkit-scrollbar { display: none; }
.nsb-stash-field.arranged .nsb-piece { position: static; }
.nsb-stash-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--text-muted); font-size: 12px; }
.nsb-stash-empty .nsb-se-en { font-family: var(--font-script); font-size: 22px; color: var(--accent); opacity: 0.6; }
.nsb-stash-field.arranged .nsb-stash-empty { position: static; }

/* ===== 棰勮閾佺洅锛堝彸渚э紝鍚屾鍑归櫡閾佺洅锛?===== */
.nsb-preset-box {
    position: absolute; top: 0; bottom: 0; z-index: 2;
    background: var(--surface-solid); border: 1px solid var(--border-faint); border-radius: var(--radius-lg);
    box-shadow: inset 0 3px 9px rgba(30,24,20,0.09), inset 0 -1px 0 rgba(255,255,255,0.6), var(--shadow-xs);
    display: flex; flex-direction: row; overflow: hidden;
    right: 0; width: 42px;                 /* 收起：只露左侧一角（42px 宽） */
    transition: width 0.36s cubic-bezier(0.22,0.61,0.36,1);
}
.nsb-stash-zone.preset-open .nsb-preset-box { width: calc(74% - 8px); }   /* 展开占右侧约 74% */
.nsb-preset-label {
    position: absolute; left: -6px; top: 26%; z-index: 6;
    width: 34px; height: 78px; background: var(--accent); color: #FCFAF6;
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    writing-mode: vertical-rl; font-size: 12px; letter-spacing: 0.16em; cursor: pointer;
    box-shadow: 2px 2px 8px rgba(160,145,130,0.22);
    transition: background 0.2s ease;
    touch-action: none; user-select: none; -webkit-user-select: none;   /* 手机拖动不被浏览器手势掐断（pointercancel→弹回） */
    touch-callout: none;
}
.nsb-preset-label:hover { background: var(--accent-hover); }
.nsb-preset-cats { flex: 0 0 auto; width: 58px; display: flex; flex-direction: column; gap: 6px; padding: 10px 7px; overflow-y: auto; scrollbar-width: none; z-index: 3; position: relative; opacity: 0; transition: opacity 0.22s ease; }
.nsb-stash-zone.preset-open .nsb-preset-cats { opacity: 1; }
.nsb-preset-cats::-webkit-scrollbar { display: none; }
.nsb-pcat { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface-solid); border-radius: var(--radius-full); height: 30px; padding: 0 9px; font-size: 11px; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease; }
.nsb-pcat:hover { border-color: var(--accent); color: var(--accent); }
.nsb-pcat:active { transform: scale(0.94); }
.nsb-pcat.active { background: var(--accent); color: #FCFAF6; border-color: transparent; }
.nsb-preset-body { flex: 1; min-height: 0; padding: 10px 10px 14px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; scrollbar-width: none; z-index: 3; position: relative; opacity: 0; transition: opacity 0.22s ease; }
.nsb-stash-zone.preset-open .nsb-preset-body { opacity: 1; }
.nsb-preset-body::-webkit-scrollbar { display: none; }
.nsb-preset-empty { width: 100%; text-align: center; color: var(--text-muted); font-size: 12px; padding: 24px 0; }

/* ===== 鎷煎浘鍗＄墖锛堢粺涓€灏哄?+ 鍥剧墖鍓薄褰?绌轰腑闅忓垎绫诲彉鑹诧級 ===== */
.nsb-piece {
    position: relative;
    box-sizing: border-box;
    width: 90px; height: 94px;                /* 统一大一些，给文字更多空间 */
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 7px 24px 7px 8px;   /* 右侧多留（右缘凸/凹陷圈，文字避开） */
    color: var(--text-primary); font-weight: 500; text-align: center;
    cursor: grab; user-select: none; touch-action: none;
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    background: linear-gradient(178deg, color-mix(in srgb, var(--cat) 26%, var(--surface-solid)) 0%, color-mix(in srgb, var(--cat) 54%, var(--surface-solid)) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -3px 6px rgba(120,90,70,0.10), 0 2px 5px rgba(120,90,70,0.10);
    transition: box-shadow 0.18s ease, opacity 0.18s ease, transform 0.12s ease, filter 0.18s ease;
}
.nsb-piece.bump  { -webkit-mask-image: url('/img/puzzle-pieces/puzzle-bump-mask.png?v=20260929');  mask-image: url('/img/puzzle-pieces/puzzle-bump-mask.png?v=20260929'); }
.nsb-piece.notch { -webkit-mask-image: url('/img/puzzle-pieces/puzzle-notch-mask.png?v=20260929'); mask-image: url('/img/puzzle-pieces/puzzle-notch-mask.png?v=20260929'); }
.nsb-piece:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -3px 6px rgba(120,90,70,0.10), 0 7px 14px rgba(120,90,70,0.16); }
.nsb-piece:active { cursor: grabbing; }
.nsb-piece-title { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: normal; line-height: 1.24; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; word-break: break-word; }
.nsb-piece-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--type-color, var(--sage)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--type-color, var(--sage)) 30%, transparent); flex-shrink: 0; }
.nsb-piece-dur { font-size: 9px; color: var(--text-secondary); font-weight: 600; flex-shrink: 0; max-width: 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nsb-piece.dragging { position: fixed; z-index: 1700; transform: scale(1.06); box-shadow: 0 14px 28px rgba(120,90,70,0.22); cursor: grabbing; transition: none; filter: brightness(1.04); }
/* 已完成拼图：灰显（当日盒沉底） */
.nsb-piece.done { opacity: 0.5; filter: grayscale(0.6); }
.nsb-piece.preset-piece { cursor: pointer; }

/* ===== 澶氶€夋粦鍑洪潰鏉?===== */
/* 多选&复用界面样式已迁移至 panels-calendar-builder-multi.css（旧 .nsb-multi-panel 为死代码，已删） */

/* ===== 鏂板鎷煎浘缂栬緫鍣?===== */
.nsb-editor-overlay { position: absolute; inset: 0; z-index: 1680; background: rgba(30,24,22,0.42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.24s ease; backdrop-filter: blur(2px); }
.nsb-editor-overlay.show { opacity: 1; animation: nsbFadeIn 0.24s ease; }
.nsb-editor-card { width: min(88%, 340px); max-height: 88%; overflow-y: auto; background: var(--surface-solid); border-radius: var(--radius-xl); padding: 20px 20px 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); scrollbar-width: none; }
.nsb-editor-card::-webkit-scrollbar { display: none; }
.nsb-editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nsb-editor-title { font-family: var(--font-reading); font-size: 18px; color: var(--text-primary); letter-spacing: 0.06em; }
.nsb-editor-close { width: 30px; height: 30px; border: 1px solid var(--border); background: var(--surface-solid); border-radius: 50%; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease; }
.nsb-editor-close:hover { background: var(--accent-light); color: var(--accent); }
.nsb-editor-close:active { transform: scale(0.9); }
.nsb-field { margin-bottom: 14px; }
.nsb-field-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 7px; letter-spacing: 0.04em; }
.nsb-input { width: 100%; border: 1px solid var(--border); background: var(--input-bg); border-radius: var(--radius-md); padding: 11px 12px; font-family: inherit; font-size: 14px; color: var(--text-primary); outline: none; -webkit-appearance: none; appearance: none; autocomplete: off; autocapitalize: off; autocorrect: off; spellcheck: false; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.nsb-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.nsb-input::placeholder { color: var(--text-muted); }
.nsb-dur-seg { display: flex; gap: 8px; }
.nsb-dur-btn { flex: 1; height: 46px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-solid); color: var(--text-secondary); font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease; }
.nsb-dur-btn:hover { border-color: var(--accent); color: var(--accent); }
.nsb-dur-btn:active { transform: scale(0.96); }
.nsb-dur-btn.active { background: var(--accent); color: #FCFAF6; border-color: transparent; box-shadow: var(--shadow-sm); }
.nsb-dur-btn small { font-size: 9px; opacity: 0.85; }
.nsb-chip-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.nsb-chip { height: 35px; padding: 0 12px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface-solid); color: var(--text-secondary); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease; }
.nsb-chip:hover { border-color: var(--accent); color: var(--accent); }
.nsb-chip:active { transform: scale(0.95); }
.nsb-chip.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.nsb-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-muted)); }
.nsb-chip-swatch { width: 13px; height: 13px; border-radius: var(--radius-xs); background: var(--c, var(--text-muted)); opacity: 0.9; }
.nsb-mode-toggle { display: flex; gap: 6px; margin-bottom: 14px; background: var(--input-bg); border-radius: var(--radius-md); padding: 3px; }
.nsb-mode-toggle button { flex: 1; height: 36px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease; }
.nsb-mode-toggle button.active { background: var(--surface-solid); color: var(--accent); box-shadow: var(--shadow-xs); }
.nsb-mode-toggle button:active { transform: scale(0.96); }
.nsb-editor-actions { display: flex; gap: 10px; margin-top: 18px; }
.nsb-btn { height: 46px; border: none; border-radius: var(--radius-md); cursor: pointer; font-family: inherit; font-size: 14px; letter-spacing: 0.06em; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, opacity 0.18s ease; }
.nsb-btn:active { transform: scale(0.97); }
.nsb-btn-ghost { flex: 0 0 auto; padding: 0 16px; background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.nsb-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.nsb-btn-main { flex: 1; background: var(--accent); color: #FCFAF6; box-shadow: var(--shadow-md); }
.nsb-btn-main:hover { background: var(--accent-hover); }
.nsb-batch-area { min-height: 112px; resize: vertical; width: 100%; border: 1px solid var(--border); background: var(--input-bg); border-radius: var(--radius-md); padding: 11px 12px; font-family: inherit; font-size: 13px; color: var(--text-primary); line-height: 1.6; outline: none; -webkit-appearance: none; appearance: none; autocomplete: off; autocapitalize: off; autocorrect: off; spellcheck: false; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.nsb-batch-area:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.nsb-batch-note { margin-top: -6px; font-size: 11px; line-height: 1.6; color: var(--text-muted); display: flex; gap: 5px; align-items: flex-start; }
.nsb-batch-note::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 5px; }

/* ===== 鏃堕棿璁剧疆娴眰 ===== */
.nsb-time-overlay { position: absolute; inset: 0; z-index: 1690; background: rgba(30,24,22,0.42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.24s ease; backdrop-filter: blur(2px); }
.nsb-time-overlay.show { opacity: 1; animation: nsbFadeIn 0.24s ease; }
.nsb-time-card { width: min(88%, 320px); background: var(--surface-solid); border-radius: var(--radius-xl); padding: 20px 20px 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); }
.nsb-time-title { font-family: var(--font-reading); font-size: 14px; color: var(--text-primary); text-align: center; margin-bottom: 10px; letter-spacing: 0.06em; }
.nsb-time-seg { display: flex; gap: 6px; margin-bottom: 12px; background: var(--input-bg); border-radius: var(--radius-md); padding: 3px; }
.nsb-time-seg button { flex: 1; height: 36px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: background 0.16s ease, color 0.16s ease; }
.nsb-time-seg button.active { background: var(--surface-solid); color: var(--accent); box-shadow: var(--shadow-xs); }
.nsb-time-display { text-align: center; font-family: var(--font-reading); font-size: 24px; color: var(--text-primary); margin-bottom: 12px; letter-spacing: 0.04em; }
.nsb-time-cols { display: flex; gap: 8px; height: 168px; }
.nsb-time-col { flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px; scrollbar-width: none; }
.nsb-time-col::-webkit-scrollbar { display: none; }
.nsb-time-opt { height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: background 0.14s ease, color 0.14s ease; }
.nsb-time-opt:hover { background: var(--accent-light); }
.nsb-time-opt.active { background: var(--accent); color: #FCFAF6; }
.nsb-time-foot { display: flex; gap: 10px; margin-top: 16px; }

/* ===== 鑷畾涔夊垎绫昏緭鍏ュ脊绐楋紙瀹屽叏鑷粯锛?===== */
.nsb-prompt-overlay { position: absolute; inset: 0; z-index: 1690; background: rgba(30,24,22,0.42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.24s ease; backdrop-filter: blur(2px); }
.nsb-prompt-overlay.show { opacity: 1; animation: nsbFadeIn 0.24s ease; }
.nsb-prompt-card { width: min(82%, 300px); background: var(--surface-solid); border-radius: var(--radius-xl); padding: 22px 20px 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); }
.nsb-prompt-title { font-family: var(--font-reading); font-size: 15px; color: var(--text-primary); text-align: center; margin-bottom: 16px; letter-spacing: 0.04em; }
.nsb-prompt-foot { display: flex; gap: 10px; margin-top: 16px; }

/* ===== 绐勫睆閫傞厤锛?370px锛?===== */
@media (max-width: 369px) {
    .nsb-body { padding: 6px; gap: 6px; }
    .nsb-left { flex-basis: 37%; }
    .nsb-day { height: 23px; font-size: 10px; }
    .nsb-piece-title { max-width: 46px; }
    .nsb-piece { width: 74px; height: 78px; padding: 5px 19px 5px 6px; }
    .nsb-stash-zone { height: 218px; }
    .nsb-daybox { height: 122px; }
    .nsb-trash { min-height: 82px; }
    .nsb-field-label { font-size: 11px; }
}

/* 鍑忓皯鍔ㄧ敾鍋忓ソ */
@media (prefers-reduced-motion: reduce) {
    .nsb-overlay.show, .nsb-editor-overlay.show, .nsb-time-overlay.show, .nsb-prompt-overlay.show { animation: none; transition: none; }
    .nsb-preset-box, .nsb-multi-overlay { transition: none; }
    .nsb-piece, .nsb-row, .nsb-trash-lid, .nsb-day, .nsb-btn, .nsb-chip, .nsb-action-btn, .nsb-daybox-pull { transition: none; }
    .nsb-zone-glow { animation: none; }
}

/* 拖拼图到预设上时高亮（柔和羽化光，无实心描边） */
.nsb-preset-box.nsb-preset-lit { box-shadow: 0 0 18px 4px var(--accent-light); }
/* 拖拼图到任意盒子（当日/暂存/预设/垃圾桶）时：只做柔光羽化脉动；不改 opacity，里面的拼图/多选条不跟着闪 */
@keyframes nsbGlowPulse {
    0%, 100% { box-shadow: 0 0 20px 6px color-mix(in srgb, var(--accent) 42%, transparent); }
    50%      { box-shadow: 0 0 8px 2px color-mix(in srgb, var(--accent) 15%, transparent); }
}
.nsb-zone-glow { animation: nsbGlowPulse 1.15s ease-in-out infinite; border-radius: var(--radius-lg) !important; }
.nsb-preset-box.nsb-zone-glow { border-radius: var(--radius-lg) !important; }
/* 窄屏：按钮不换行、收紧 */
@media (max-width: 369px) {
    .nsb-btn { font-size: 13px; letter-spacing: 0.02em; }
    .nsb-btn-ghost { padding: 0 12px; }
}
/* 预设拼图删除钮 */
.nsb-piece-del { flex-shrink: 0; width: 20px; height: 20px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.16s ease, color 0.16s ease; margin-left: -4px; }
.nsb-piece-del:hover { background: var(--accent-light); color: var(--accent); }
.nsb-piece-del:active { transform: scale(0.9); }
.nsb-preset-piece { position: relative; }
/* 头部「?」帮助按钮 */
.nsb-help-btn { font-family: var(--font-reading); font-size: 16px; color: var(--text-secondary); }
.nsb-help-btn:hover { background: var(--accent-light); color: var(--accent); }
/* 「?」帮助浮层 */
.nsb-help-overlay { position: absolute; inset: 0; z-index: 1710; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.24s ease; }
.nsb-help-overlay.show { opacity: 1; animation: nsbFadeIn 0.24s ease; }
.nsb-help-backdrop { position: absolute; inset: 0; background: rgba(30,24,22,0.42); }
.nsb-help-card { position: relative; width: min(86%, 320px); background: var(--surface-solid); border-radius: var(--radius-xl); padding: 20px 18px 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); }
.nsb-help-title { font-family: var(--font-reading); font-size: 16px; color: var(--text-primary); text-align: center; margin-bottom: 14px; letter-spacing: 0.1em; }
.nsb-help-close { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: none; background: var(--input-bg); border-radius: 50%; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.18s ease, color 0.18s ease; }
.nsb-help-close:hover { background: var(--accent-light); color: var(--accent); }
.nsb-help-body { display: flex; flex-direction: column; gap: 10px; }
.nsb-help-row { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.nsb-help-row .nsb-hd { font-size: 12.5px; color: var(--text-primary); font-weight: 600; }
/* ===== 主界面「新增日程」入口（整行横条，文字居中；放到本文件确保生效） ===== */
#nest-sub-calendar .nc-new-schedule { padding: 2px 2px 6px; }
#nest-sub-calendar .nc-new-schedule-btn {
    width: 100% !important; margin-top: 4px !important; border: none !important; border-radius: var(--radius-md) !important;
    height: 46px !important; background: var(--accent) !important; color: #FCFAF6 !important;
    font-family: 'Cormorant Garamond', 'Noto Serif SC', serif !important; font-size: 15px !important;
    letter-spacing: 0.2em !important; cursor: pointer !important;
    -webkit-appearance: none !important; appearance: none !important;
    display: flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
    box-shadow: var(--shadow-sm) !important;
}
#nest-sub-calendar .nc-new-schedule-btn:hover { background: var(--accent-hover) !important; }
#nest-sub-calendar .nc-new-schedule-btn:active { transform: scale(0.98); }
/* 帮助卡片设计化 */
.nsb-help-title { font-weight: 700; color: var(--text-primary); }
.nsb-help-title::after { content: ''; display: block; width: 34px; height: 1px; background: var(--gold); opacity: 0.6; margin: 8px auto 0; }
.nsb-help-row { padding: 0 2px; }
.nsb-help-row .nsb-hd { color: var(--accent); letter-spacing: 0.02em; }
/* ===== 拼图剪影 = 用甲方提供的两张透明底拼图（右凸/右凹）作 mask，随分类变色 ===== */

/* ===== 合并页「左编辑 / 右时间」（事件与模板共用，单击拼图/清单行进入）= 甲方 2026-09 换边 + 分层 ===== */
.nsb-hero-overlay { position: absolute; inset: 0; z-index: 1730; background: rgba(30,24,22,0.42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.24s ease; backdrop-filter: blur(2px); }
.nsb-hero-overlay.show { opacity: 1; animation: nsbFadeIn 0.24s ease; }
.nsb-hero-card { width: min(94%, 440px); max-height: 92%; overflow-y: auto; background: var(--surface-solid); border-radius: 22px; padding: 20px 20px 18px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); scrollbar-width: none; }
.nsb-hero-card::-webkit-scrollbar { display: none; }
.nsb-hero-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gold-light); }
.nsb-hero-title { font-family: var(--font-reading); font-size: 17px; color: var(--text-primary); letter-spacing: 0.06em; }
.nsb-hero-body { display: flex; gap: 14px; }
.nsb-hero-left { flex: 1 1 58%; min-width: 0; }
.nsb-hero-right { flex: 1 1 42%; min-width: 0; display: flex; flex-direction: column; }
/* 左侧编辑区：每个字段一块分组卡片，主次分明 */
.nsb-hero-left .nsb-field { background: var(--bg-secondary, var(--surface-solid)); border: 1px solid var(--border-faint); border-radius: var(--radius-md); padding: 10px 11px; margin-bottom: 10px; }
.nsb-hero-left .nsb-field .nsb-field-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.08em; margin-bottom: 6px; }
/* 右侧时间区：一块突出的分组卡，顶部小标题 */
.nsb-hero-right { background: var(--bg-secondary, var(--surface-solid)); border: 1px solid var(--border-faint); border-radius: var(--radius-md); padding: 12px; }
.nsb-hero-right .nsb-field-label { font-size: 11px; color: var(--accent-rose); letter-spacing: 0.08em; margin-bottom: 8px; font-weight: 500; }
.nsb-hero-sec { margin-bottom: 12px; }
.nsb-hero-time { width: 100%; border: 1px solid var(--border); background: var(--surface-solid); border-radius: var(--radius-md); padding: 11px 12px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-family: inherit; font-size: 13px; cursor: pointer; transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease; box-shadow: var(--shadow-xs); }
.nsb-hero-time:hover { border-color: var(--accent); color: var(--accent); }
.nsb-hero-time:active { transform: scale(0.98); }
.nsb-hero-time:last-child { margin-bottom: 2px; }
.nsb-hero-time .nsb-ht-val { font-family: var(--font-reading); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.nsb-hero-time.greyed .nsb-ht-lbl, .nsb-hero-time.greyed .nsb-ht-val { color: var(--text-muted); }
.nsb-hero-dur { display: flex; flex-wrap: wrap; gap: 7px; }
.nsb-hero-durbtn { flex: 1 1 30%; min-width: 62px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-solid); color: var(--text-secondary); font-family: inherit; font-size: 12px; cursor: pointer; transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease; }
.nsb-hero-durbtn:hover { border-color: var(--accent); color: var(--accent); }
.nsb-hero-durbtn:active { transform: scale(0.95); }
.nsb-hero-durbtn.active { background: var(--accent); color: #FCFAF6; border-color: transparent; box-shadow: var(--shadow-sm); }
.nsb-hero-durbtn.greyed { opacity: 0.45; }
.nsb-hero-dur-note { width: 100%; font-size: 11px; color: var(--text-muted); padding: 2px 0; }
.nsb-hero-actions { display: flex; gap: 10px; margin-top: 16px; }
.nsb-hero-actions .nsb-btn-main { flex: 1; }
.nsb-hero-actions .nsb-btn-ghost { flex: 0 1 auto; color: var(--danger); border-color: var(--border); }

/* ===== 滑动选择时间滚轮（iOS 式，吸附 5 分钟刻度） ===== */
.nsb-wheel-overlay { position: absolute; inset: 0; z-index: 1750; background: rgba(30,24,22,0.42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.24s ease; backdrop-filter: blur(2px); }
.nsb-wheel-overlay.show { opacity: 1; animation: nsbFadeIn 0.24s ease; }
.nsb-wheel-card { width: min(88%, 300px); background: var(--surface-solid); border-radius: var(--radius-xl); padding: 20px 20px 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-faint); }
.nsb-wheel-title { font-family: var(--font-reading); font-size: 14px; color: var(--text-primary); text-align: center; margin-bottom: 8px; letter-spacing: 0.06em; }
.nsb-wheel-display { text-align: center; font-family: var(--font-reading); font-size: 24px; color: var(--text-primary); margin-bottom: 12px; letter-spacing: 0.04em; }
.nsb-wheel-area { position: relative; display: flex; height: 172px; border-top: 1px solid var(--border-faint); border-bottom: 1px solid var(--border-faint); }
.nsb-wheel-area::before, .nsb-wheel-area::after { content: ''; position: absolute; left: 0; right: 0; height: 34px; z-index: 2; pointer-events: none; }
.nsb-wheel-area::before { top: 0; background: linear-gradient(180deg, var(--surface-solid) 0%, transparent 100%); }
.nsb-wheel-area::after { bottom: 0; background: linear-gradient(0deg, var(--surface-solid) 0%, transparent 100%); }
.nsb-wheel-col { flex: 1; overflow-y: auto; scrollbar-width: none; scrollbar-color: transparent transparent; -webkit-overflow-scrolling: touch; }
.nsb-wheel-col::-webkit-scrollbar { display: none; }
.nsb-wheel-opt { height: 40px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-secondary); transition: transform 0.16s ease, color 0.16s ease, font-weight 0.16s ease; }
.nsb-wheel-opt.active { color: var(--accent); font-weight: 700; transform: scale(1.08); }
.nsb-wheel-spacer { visibility: hidden; }
.nsb-wheel-sep { display: flex; align-items: center; justify-content: center; font-family: var(--font-reading); font-size: 20px; color: var(--text-secondary); flex: 0 0 auto; padding: 0 3px; }

