/* History is a paper archive. Explicit stretch alignment keeps genuine shadcn
   Button defaults from centering every opaque card row independently. */
.history-page{--archive-paper:#fffefa;--archive-line:#d7dfd3;--archive-quiet:#5d6d63}
.history-page .history-hero{grid-template-columns:minmax(0,1fr) 180px 96px;gap:26px;min-height:0;margin-bottom:0;padding:10px 6px 20px;border-bottom:1px solid var(--archive-line);overflow:visible}
.history-page .history-hero h1{font-size:clamp(2.3rem,4vw,2.9rem);letter-spacing:.035em}
.history-page .history-kicker{margin-bottom:8px;color:#657162;font-size:.65rem;letter-spacing:.14em}
.history-page .history-hero-note{margin:10px 0 13px;font-size:.76rem;line-height:1.65}
.history-page .history-hero-art{align-self:center;aspect-ratio:1}
.history-page .history-hero-art:before{inset:12% 9% 9%}
.history-page .history-hero-orbit{inset:16% 5% 10%}
.history-page .history-hero-art>img{max-width:none;width:100%}
.history-page .history-archive-count{padding-left:22px;color:#60715e}
.history-page .history-archive-count strong{font-size:2.7rem;font-variant-numeric:tabular-nums}
.history-page .history-filters{grid-template-columns:minmax(230px,1fr) 158px 130px 130px;gap:14px;margin-top:22px;padding:17px 19px 19px;border:1px solid var(--archive-line);border-radius:18px;background:#f5f7f0}
.history-page .history-filter-caption{color:#5c6b5e;font-size:.65rem}
.history-page .history-search,.history-page .history-filter-select select{height:44px;border-radius:10px;border-color:#c8d3c4;background:#fffefa;font-size:.76rem;box-shadow:none}
.history-page .history-results-head{margin:24px 3px 14px}
.history-page .history-results-head h2{font-size:.87rem}
.history-page .history-record-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:20px}
.history-page .history-record{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;width:100%;height:auto;min-height:0;padding:18px 22px 14px;text-align:left;white-space:normal;border:1px solid color-mix(in srgb,var(--history-tone) 21%,#dce2d5);border-radius:20px;background:linear-gradient(115deg,#fffefa 35%,color-mix(in srgb,var(--history-soft) 72%,#fffefa));box-shadow:0 5px 15px #263d2c08;overflow:visible;transition:transform .2s,box-shadow .2s,border-color .2s}
.history-page .history-record:before{top:21px;height:21px;width:3px}
.history-page .history-record:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--history-tone) 48%,#dce2d5);box-shadow:0 12px 26px #263d2c14}
.history-page .history-record:focus-visible{outline:3px solid var(--history-tone);outline-offset:4px}
.history-page .history-record-top{display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;gap:12px}
.history-page .history-category{gap:8px;font-size:.7rem;line-height:1.5;min-width:0}
.history-page .history-category>span{width:25px;height:25px;flex:0 0 25px;border-radius:7px}
.history-page .history-record-arrow{width:20px;height:20px;flex:0 0 20px;border:0;background:transparent;color:var(--history-tone);font-size:1rem}
.history-page .history-record:hover .history-record-arrow{background:transparent;transform:translate(2px,-2px)}
.history-page .history-record-body{display:grid;grid-template-columns:minmax(0,1fr) 170px;align-items:start;gap:16px;width:100%;min-width:0;min-height:0;padding:10px 0 8px}
.history-page .history-record-copy{display:flex;flex-direction:column;align-items:stretch;align-self:start;justify-content:flex-start;gap:9px;min-width:0;padding:3px 0}
.history-page .history-record-period{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px;color:#607063;font-size:.68rem;font-weight:550;line-height:1.6;overflow-wrap:anywhere}
.history-page .history-record-title{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-width:none;margin:0;color:color-mix(in srgb,var(--history-tone) 27%,#25372d);font:900 clamp(1.15rem,1.7vw,1.42rem)/1.55 "SimSun","宋体","Noto Serif SC",serif;letter-spacing:.02em;-webkit-text-stroke:.1px currentColor;overflow-wrap:anywhere}
.history-page .history-record-title.is-period-title{display:block;overflow:visible;-webkit-line-clamp:unset}
.history-page .is-period-title .history-period-date{display:block}
.history-page .is-period-title .history-period-weekday{display:block;margin-top:3px;color:#677267;font:500 .7rem/1.6 "Noto Sans SC","Microsoft YaHei",sans-serif;letter-spacing:.04em;-webkit-text-stroke:0}
.history-page .history-record-excerpt{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:#59685c;font:400 .77rem/1.8 "Noto Sans SC","Microsoft YaHei",sans-serif;overflow-wrap:anywhere}
.history-page .history-record-art{align-self:end;width:170px;max-width:100%;height:170px;aspect-ratio:1;margin:0 0 0 auto;pointer-events:none}
.history-page .history-record-art:before{inset:16% 4% 8%;border-color:color-mix(in srgb,var(--history-tone) 12%,transparent);background:color-mix(in srgb,var(--history-tone) 4%,transparent);transform:rotate(-10deg)}
.history-page .history-record-art img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 6px 8px color-mix(in srgb,var(--history-tone) 10%,transparent));transition:transform .25s}
.history-page .history-record:hover .history-record-art img{transform:translateY(-3px);rotate:none}
.history-page .history-record-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;margin-top:auto;padding:10px 0 0;border-top:1px solid color-mix(in srgb,var(--history-tone) 15%,#e3e6db)}
.history-page .history-record-intent{color:var(--history-tone);font-size:.68rem;font-weight:650;line-height:1.6;letter-spacing:.04em}
.history-page .history-record-open{display:inline-flex;align-items:center;gap:8px;color:var(--history-tone);font-size:.67rem;font-weight:650;line-height:1.6}
.history-page .history-status{font-size:.62rem;padding:4px 8px;line-height:1.45}
.history-page .history-empty{padding:29px 38px;grid-template-columns:185px minmax(0,1fr);border:1px dashed #bbcbb8;border-radius:20px;background:#f5f7ef}
@media(max-width:960px){
 .history-page .history-hero{grid-template-columns:minmax(0,1fr) 170px 82px;gap:19px}
 .history-page .history-filters{grid-template-columns:minmax(180px,1fr) 140px 112px 112px;gap:10px;padding:15px}
 .history-page .history-record{padding:17px 18px 14px}
 .history-page .history-record-body{grid-template-columns:minmax(0,1fr) 140px;gap:12px;min-height:0}
 .history-page .history-record-art{width:140px;height:140px}
 .history-page .history-record-title{font-size:1.16rem}
 .history-page .history-record-excerpt{font-size:.73rem}
}
@media(max-width:820px){
 .history-page .history-hero{grid-template-columns:minmax(0,1fr) 170px;gap:22px;min-height:0;padding:7px 2px 20px}
 .history-page .history-archive-count{display:none}
 .history-page .history-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
 .history-page .history-search-field{grid-column:1/-1}
 .history-page .history-type-filter{grid-column:auto}
 .history-page .history-record-grid{grid-template-columns:minmax(0,1fr);gap:16px}
 .history-page .history-record{padding:18px 22px 15px}
 .history-page .history-record-body{grid-template-columns:minmax(0,1fr) 170px;gap:20px;min-height:0;padding:10px 0 8px}
 .history-page .history-record-title{font-size:1.35rem}
 .history-page .history-record-art{width:170px;max-width:100%;height:170px}
 .history-page .history-record-excerpt{font-size:.77rem}
}
@media(max-width:520px){
 .history-page .history-hero{grid-template-columns:minmax(0,1fr) 118px;gap:9px;padding-bottom:18px}
 .history-page .history-hero h1{font-size:2.15rem;letter-spacing:.03em}
 .history-page .history-hero .history-kicker{font-size:.59rem;letter-spacing:.1em;margin-bottom:10px}
 .history-page .history-hero-note{font-size:.74rem;line-height:1.75;margin:10px 0 14px}
 .history-page .history-write{min-height:42px;font-size:.68rem;gap:11px;padding:9px 12px}
 .history-page .history-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:12px 10px;border-radius:16px}
 .history-page .history-search-field,.history-page .history-type-filter{grid-column:1/-1}
 .history-page .history-filter-caption{font-size:.65rem}
 .history-page .history-search,.history-page .history-filter-select select{font-size:.74rem}
 .history-page .history-results-head{margin-top:20px}
 .history-page .history-record{padding:16px 17px 14px;border-radius:18px}
 .history-page .history-category{font-size:.68rem}
 .history-page .history-record-body{grid-template-columns:minmax(0,1fr) 36%;gap:10px;min-height:0;padding:10px 0 10px}
 .history-page .history-record-art{width:100%;height:auto}
 .history-page .history-record-title{font-size:1.2rem;line-height:1.5}
 .history-page .history-record-period{font-size:.66rem;gap:1px 6px}
 .history-page .history-record-excerpt{font-size:.74rem;line-height:1.75}
 .history-page .history-record-foot{padding-top:11px}
 .history-page .history-record-intent{font-size:.67rem}
 .history-page .history-status{font-size:.62rem}
 .history-page .history-empty{grid-template-columns:minmax(0,1fr);gap:8px;padding:21px 20px 25px}
 .history-page .history-empty>img{width:145px;margin:auto}
 .history-page .history-empty h3{font-size:1.3rem}
}
@media(max-width:360px){
 .history-page .history-hero{grid-template-columns:minmax(0,1fr) 92px;gap:7px}
 .history-page .history-hero h1{font-size:1.9rem}
 .history-page .history-record{padding:14px}
 .history-page .history-record-body{grid-template-columns:minmax(0,1fr) 33%;gap:8px;min-height:0}
 .history-page .history-record-title{font-size:1.1rem}
 .history-page .history-record-excerpt{font-size:.71rem}
}
@media(prefers-reduced-motion:reduce){.history-page .history-record,.history-page .history-record-art img,.history-page .history-record-arrow{transition:none}}
body.reduce-motion .history-page .history-record,body.reduce-motion .history-page .history-record-art img,body.reduce-motion .history-page .history-record-arrow{transition:none}
