/* 首页使用原型定稿参数；数据和项目操作由 Home 保留真实接口。 */
body [data-home-root].home-prototype{background:var(--c-bg);color:var(--c-ink);font-family:var(--font-sans);overflow:auto;display:block;padding:0!important;max-width:none!important;width:100%;height:100%}
.app-shell:has(.home-prototype){padding-bottom:0}
body .home-prototype>header{margin-bottom:0}
.home-prototype .hp-header{height:var(--bar-h);min-height:46px;display:flex;align-items:center;gap:var(--hp-header-gap);padding:0 24px;border-bottom:1px solid var(--c-line);position:sticky;top:0;background:var(--c-bg);z-index:var(--z-raised);--hp-header-gap:16px}
/* 顶栏几个按钮之间的间隔也算点中：命中区左右各扩半个间隔 */
.home-prototype .hp-header>button{position:relative}
.home-prototype .hp-header>button::after{content:"";position:absolute;inset:0 calc(var(--hp-header-gap)/-2)}
.home-prototype .hp-brand{font-size:var(--fs-heading);font-family:var(--font-serif);margin-right:auto}
.home-prototype .hp-search{display:flex;align-items:center;max-width:420px;flex:1;background:var(--c-card);border-radius:8px;margin-right:auto;padding:0 8px}
.home-prototype .hp-search input{min-width:0;flex:1;width:100%;background:transparent;border:0;color:var(--c-ink);height:30px;font-size:var(--fs-body)}
body .home-prototype button{font-family:inherit;font-size:var(--fs-body);min-height:26px;padding:4px 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--c-ink);cursor:pointer;line-height:1.5}
.home-prototype button:hover{background:var(--c-hover,var(--c-bg))}
.home-prototype button:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px}
.home-prototype button:disabled{opacity:.5;cursor:wait}
.home-prototype .hp-body{max-width:1740px;margin:auto;padding:32px 48px 24px}
body .home-prototype h1{font:400 var(--fs-page)/1.4 var(--font-serif);margin:0}
body .home-prototype h2{font:600 var(--fs-body)/1.5 var(--font-sans);margin:0 0 12px}
body .home-prototype h3{font:600 var(--fs-title)/1.5 var(--font-sans);margin:0 0 8px}
.home-prototype p{font-size:var(--fs-body);line-height:1.6;margin:var(--sp-sm) 0}
.home-prototype small,.home-prototype .hp-muted{font-size:var(--fs-note);color:var(--c-muted,var(--c-ink-2))}
/* 方向 B 小组件：首页日期与每日一句各自成卡，长句完整显示。 */
body:not(.dark):not(.midnight) [data-home-root].home-prototype{--c-bg:var(--home-widget-canvas)}
body:not(.dark):not(.midnight) .home-prototype .hp-welcome{--c-ink:var(--home-widget-ink);--c-ink-2:var(--home-widget-muted);--c-accent:var(--home-widget-accent)}
body [data-home-root].home-prototype .hp-welcome{--hp-widget-serif:"Songti SC","STSong",serif;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) .7fr;gap:10px;align-items:stretch;padding:0 0 32px}
.home-prototype .hp-hello,.home-prototype .hp-words{box-sizing:border-box;min-width:0;min-height:232px;background:var(--c-card);border-radius:16px;display:flex;flex-direction:column;justify-content:space-between}
.home-prototype .hp-hello{padding:24px 26px}
.home-prototype .hp-welcome .hp-date{display:flex;flex-direction:column;gap:2px;margin:0;font-size:13px;line-height:1.5}
.home-prototype .hp-weekday{font-size:14px;font-weight:600;color:var(--c-accent);letter-spacing:.04em}
.home-prototype .hp-day{font:500 91px/1 var(--hp-widget-serif);color:var(--c-ink)}
.home-prototype .hp-month{font-size:15px;margin-top:6px;color:var(--c-ink-2)}
body .home-prototype .hp-welcome h1{margin:12px 0 0;font:400 20px/1.5 var(--hp-widget-serif);letter-spacing:.08em}
.home-prototype .hp-words{grid-column:2/-1;padding:24px 28px 14px 40px;gap:16px}
.home-prototype .hp-quote-label{font-size:17px;font-weight:600;color:var(--c-ink-2);letter-spacing:.08em}
.home-prototype .hp-quote{margin:0;max-width:none;font:500 19px/1.5 var(--hp-widget-serif);letter-spacing:.04em;color:var(--c-ink);overflow-wrap:anywhere;text-wrap:pretty}
.home-prototype .hp-quote-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-prototype .hp-quote-src{font:inherit;color:inherit;overflow-wrap:anywhere}
.home-prototype .hp-quote-actions{display:flex;gap:2px;margin-left:auto;flex:none}
body [data-home-root].home-prototype .hp-quote-actions button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:22px!important;color:var(--c-ink-2)}
.home-prototype .hp-quote-actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.home-prototype .hp-quote-save[aria-pressed=true] svg{fill:currentColor}
@media(max-width:800px){body [data-home-root].home-prototype .hp-welcome{grid-template-columns:minmax(150px,1fr) minmax(0,2.7fr)}.home-prototype .hp-words{grid-column:2;padding-left:26px}.home-prototype .hp-quote{font-size:17px}.home-prototype .hp-quote-src{font-size:18px}.home-prototype .hp-quote-footer{flex-wrap:wrap;gap:4px}}
@media(max-width:520px){body [data-home-root].home-prototype .hp-welcome{grid-template-columns:1fr}.home-prototype .hp-words{grid-column:auto}.home-prototype .hp-hello{min-height:232px}}
.home-prototype .hp-week-sum{margin:0 0 var(--sp-sm);color:var(--c-ink-2);font-variant-numeric:tabular-nums}
.home-prototype .hp-chart{display:block;width:100%;height:64px;overflow:visible;border-bottom:1px solid var(--c-line)}
.home-prototype .hp-chart polyline{stroke:var(--c-accent);stroke-width:2;fill:none;stroke-linejoin:round}
.home-prototype .hp-section{margin-top:24px}
.home-prototype .hp-create-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) .7fr;gap:16px}
body .home-prototype .hp-create{height:112px;display:flex;align-items:center;gap:12px;text-align:left;padding:20px;background:var(--c-card);border-radius:13px;border:1px solid var(--c-line)}
.home-prototype .hp-create .ico{flex:none;width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r-control);background:var(--hp-tint);color:var(--hp-color)}
.home-prototype .ico svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.5}
.home-prototype .hp-create b{display:block;font-size:var(--fs-card);font-weight:var(--fw-strong);white-space:nowrap}
.home-prototype .hp-create small{display:block;margin-top:4px;font-size:var(--fs-note)}
.home-prototype .hp-grow{flex:1;min-width:0}
.home-prototype .hp-sage{--hp-tint:var(--c-cover-1);--hp-color:var(--c-ink)}
.home-prototype .hp-mist{--hp-tint:var(--c-cover-3);--hp-color:var(--c-ink)}
.home-prototype .hp-rose{--hp-tint:var(--c-cover-2);--hp-color:var(--c-ink)}
.home-prototype .hp-quick{display:grid;grid-template-rows:1fr 1fr;gap:12px}
.home-prototype .hp-quick button{border:1px dashed var(--c-line);background:transparent}
.home-prototype .hp-card{background:var(--c-card);border:1px solid var(--c-line);border-radius:13px;overflow:hidden}
.home-prototype .hp-pad{padding:20px}
.home-prototype .hp-continue{display:flex;align-items:center;gap:24px;padding:16px 20px}
.home-prototype .hp-cover{aspect-ratio:var(--project-cover-card-ratio);background:var(--hp-tint);color:var(--hp-color);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-sm);padding:16px;text-align:center;cursor:pointer}
.home-prototype .hp-cover span{font-size:var(--fs-foot)}
.home-prototype .hp-cover strong{font:400 var(--fs-card)/1.5 var(--font-serif);overflow-wrap:anywhere}
.home-prototype .hp-continue .hp-cover{width:80px;aspect-ratio:var(--project-cover-spine-ratio);flex:none;border-radius:var(--r-tag);padding:8px}
.home-prototype .hp-continue .hp-cover strong{font-size:var(--fs-title)}
body .home-prototype .hp-resume-name{font-size:var(--fs-card);padding:0;text-align:left;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body .home-prototype .hp-primary{background:var(--c-accent);color:var(--c-on-accent);padding:6px 18px}
.home-prototype .hp-dashboard{display:grid;grid-template-columns:minmax(0,2.6fr) minmax(260px,1fr);gap:24px}
.home-prototype .hp-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-prototype .hp-heading h2{margin-bottom:0}
.home-prototype .hp-heading small{font-variant-numeric:tabular-nums}
.home-prototype select{background:var(--c-card);color:var(--c-ink);border:1px solid var(--c-line);border-radius:6px;font-size:var(--fs-note);padding:4px 8px}
.home-prototype .hp-filters{display:flex;flex-wrap:wrap;gap:4px;margin:12px 0}
.home-prototype .hp-filters button,.home-prototype .hp-moods button{font-size:var(--fs-note)}
.home-prototype [aria-pressed=true]{background:var(--c-bg);border-color:var(--c-accent)}
.home-prototype .hp-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.home-prototype .hp-project-name{font-size:var(--fs-title);font-weight:600;padding:0;text-align:left;max-width:100%;overflow-wrap:anywhere}
.home-prototype .hp-summary{font-size:var(--fs-note);min-height:38px;margin:12px 0}
.home-prototype .hp-stack{display:grid;gap:20px;align-content:start}
.home-prototype .hp-metric{font-size:var(--fs-page);font-weight:var(--fw-strong);display:block;font-variant-numeric:tabular-nums}
.home-prototype .hp-moods{display:flex;gap:var(--sp-sm);flex-wrap:wrap;margin-bottom:12px}
.home-prototype .hp-moods button{border:1px solid var(--c-line)}
.home-prototype textarea{resize:vertical;min-height:64px;width:100%;background:var(--c-bg);color:var(--c-ink);border:1px solid var(--c-line);border-radius:7px;font:var(--fs-note)/1.5 var(--font-sans);padding:8px;margin-bottom:8px}
.home-prototype .hp-stack small{display:block;margin-top:8px}
.home-prototype .hp-empty{padding:24px 0;color:var(--c-muted,var(--c-ink-2));font-size:var(--fs-body)}
.home-prototype .hp-project-grid>.hp-empty{grid-column:1/-1}
.home-prototype .hp-links{display:flex;justify-content:flex-end;gap:16px;margin-top:24px}
.home-dialog [data-entry-mode=template]>section:nth-child(-n+2){display:none}
@media(max-width:1120px){.home-prototype .hp-create-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-prototype .hp-quick{grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:auto}.home-prototype .hp-dashboard{grid-template-columns:minmax(0,2fr) minmax(240px,1fr)}}
@media(max-width:800px){.home-prototype .hp-body{padding:24px}.home-prototype .hp-dashboard{grid-template-columns:1fr}.home-prototype .hp-create-grid{grid-template-columns:1fr}.home-prototype .hp-header{--hp-header-gap:var(--sp-xs);padding:0 12px}.home-prototype .hp-header>button{font-size:var(--fs-foot)}.home-prototype .hp-continue{gap:12px}.home-prototype .hp-continue .hp-primary{padding:6px 10px;white-space:nowrap}.home-prototype .hp-search button{display:none}}
/* theme.css 的通用输入控件选择器有三个 :not；卡片不是工具栏按钮。 */
body [data-home-root].home-prototype button.hp-create{height:112px;min-height:112px;padding:20px}
body [data-home-root].home-prototype button{height:auto}
body [data-home-root].home-prototype button.hp-create{height:112px}
body [data-home-root].home-prototype section{padding-top:0;padding-bottom:0}
body [data-home-root].home-prototype section.hp-pad{padding:20px}
body [data-home-root].home-prototype .hp-project-name{padding:0!important;margin:0!important;background:transparent!important;border-radius:0!important;color:var(--c-ink);font-size:var(--fs-title)}
body [data-home-root].home-prototype button[aria-pressed=true]{background:var(--c-accent-soft);color:var(--c-ink);border-color:var(--c-accent)}
body [data-home-root].home-prototype .hp-primary{background:var(--c-accent);color:var(--c-on-accent)}

.home-prototype .hp-heading .hp-filters{margin:0;flex:1;justify-content:flex-end}
.home-prototype .hp-heading{flex-wrap:wrap;gap:var(--sp-md)}
.home-prototype .hp-project-toggle{display:flex;justify-content:center;margin-top:var(--sp-md)}

.home-prototype .hp-cover{position:relative}
.home-prototype .hp-cover>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
body .home-prototype .hp-cover-upload{position:absolute;right:var(--sp-sm);bottom:var(--sp-sm);background:var(--c-card);border:1px solid var(--c-line);font-size:var(--fs-note)}
body dialog.home-cover-editor{width:min(900px,calc(100vw - 48px));max-height:calc(100vh - 48px);overflow:auto}
.home-cover-editor .hp-cover-layout{display:grid;grid-template-columns:minmax(0,1fr) 176px;gap:var(--sp-section)}   /* 方案 A（X209）：左原图取景、右显示位置，两步同一块画框 */
.home-cover-editor .hp-cover-layout[hidden]{display:none}
.home-cover-editor .hp-cover-main{display:flex;flex-direction:column;gap:var(--sp-related);min-width:0}
.home-cover-editor .hp-cover-original{display:flex;align-items:center;justify-content:center;min-width:0;min-height:280px;background:var(--c-bg);border-radius:var(--r-control)}
.home-cover-editor .hp-cover-help{margin:0;font-size:var(--fs-note);color:var(--c-ink-2)}
.home-cover-editor .hp-crop{position:relative;overflow:hidden;flex:none;background:var(--c-bg);touch-action:none}
.home-cover-editor .hp-crop img{display:block;width:100%;height:100%;user-select:none;pointer-events:none}
.home-cover-editor .hp-crop-frame{position:absolute;box-sizing:border-box;border:2px solid var(--crop-line);cursor:grab;touch-action:none}   /* 框外压暗，深浅色同一层黑 */
.home-cover-editor .hp-crop-frame.is-dragging{cursor:grabbing}
.home-cover-editor .hp-crop-frame:focus-visible{outline:2px solid var(--c-accent);outline-offset:-5px}
.home-cover-editor .hp-crop-handle{position:absolute;box-sizing:border-box;width:min(18px,40%);height:min(18px,40%);border:3px solid var(--crop-line);filter:drop-shadow(0 0 1px var(--crop-handle-shadow))}
.home-cover-editor .hp-crop-nw{left:-3px;top:-3px;border-right:0;border-bottom:0;cursor:nwse-resize}
.home-cover-editor .hp-crop-ne{right:-3px;top:-3px;border-left:0;border-bottom:0;cursor:nesw-resize}
.home-cover-editor .hp-crop-sw{left:-3px;bottom:-3px;border-right:0;border-top:0;cursor:nesw-resize}
.home-cover-editor .hp-crop-se{right:-3px;bottom:-3px;border-left:0;border-top:0;cursor:nwse-resize}
.home-cover-editor .hp-cover-previews{display:flex;flex-direction:column;gap:var(--sp-related)}
.home-cover-editor .hp-cover-previews h3{margin:0 0 var(--sp-inline);font-size:var(--fs-note);font-weight:var(--fw-strong);color:var(--c-ink-2)}
.home-cover-editor .hp-cover-preview{display:flex;flex-direction:column;gap:var(--sp-inline);padding:var(--sp-related) var(--sp-related) var(--sp-inline);border-radius:var(--r-control);background:var(--c-bg)}
   /* 选中的位置：主题色描边，两张瓦片同底色 */
.home-cover-editor .hp-cover-thumb{display:flex;align-items:center;justify-content:center;height:96px;cursor:pointer}
.home-cover-editor .hp-cover-preview canvas{display:block;max-width:100%;max-height:96px;width:auto;height:auto}
body dialog.home-cover-editor button.hp-cover-pick{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-related);width:100%;height:var(--h-control);padding:0 var(--sp-inline);border:0;background:transparent;color:var(--c-ink-2);font-size:var(--fs-body);text-align:left}
body dialog.home-cover-editor button.hp-cover-pick[aria-pressed=true]{color:var(--c-ink);background:transparent!important}   /* 选中只靠瓦片描边，名字行不另加底色 */
.home-cover-editor .hp-cover-pick b{font-weight:var(--fw-strong)}
.home-cover-editor .hp-cover-pick small{font-size:var(--fs-note);color:var(--c-ink-2)}
body dialog.home-cover-editor .hp-cover-pick:active{opacity:.7}
.home-cover-editor .hp-cover-actions{display:flex;align-items:center;gap:var(--sp-related);margin-top:var(--sp-section)}
.home-cover-editor .hp-cover-actions [hidden]{display:none}
.home-cover-editor .hp-cover-file{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-related);aspect-ratio:2/1;max-height:320px;margin:0;border:1px dashed var(--c-line);border-radius:var(--r-control);background:var(--c-bg)}
.home-cover-editor .hp-cover-file[hidden]{display:none}
.home-cover-editor .hp-cover-file span{font-size:var(--fs-note);color:var(--c-ink-2)}
.home-cover-editor .hp-cover-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}   /* 成功状态只给读屏 */
body dialog.home-cover-editor button.hp-cover-save:disabled{background:color-mix(in srgb,var(--c-accent) 16%,var(--c-card))!important;color:var(--c-ink-2)!important;cursor:not-allowed}   /* 未选图：浅绿底深灰字，看得见但不像能点（X208） */
.home-cover-editor .hp-cover-need{margin-left:auto;align-self:center;font-size:var(--fs-note);color:var(--c-ink-2)}
.home-cover-editor .hp-cover-need[hidden]{display:none}
.home-cover-editor .hp-cover-need[hidden]+button{margin-left:auto}
@media(max-width:700px){.home-cover-editor .hp-cover-layout{grid-template-columns:minmax(0,1fr)}.home-cover-editor .hp-cover-previews{display:grid;grid-template-columns:1fr 1fr}.home-cover-editor .hp-cover-previews h3{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.home-cover-editor .hp-crop-frame,.home-cover-editor .hp-cover-preview{animation:none;transition:none;transition-duration:0s!important}}


/* 排序文字与原生箭头各留空间。 */
body .home-prototype select[aria-label="项目排序"]{padding-right:var(--sp-xxl)!important;min-width:calc(4em + var(--sp-xxl) + var(--sp-md))}

.home-prototype .hp-quote-text{white-space:pre-line}
