*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic","Yu Gothic UI","Noto Sans JP",sans-serif;font-size:16px;line-height:1.7;color:#2b2b2b;background:#eef0f3;-webkit-text-size-adjust:100%}
a{color:inherit}
.wrap{max-width:960px;margin:0 auto}
@media(min-width:980px){.wrap{box-shadow:0 0 24px rgba(0,0,0,.08);background:#eef0f3}}

/* ===== トップ（まとめサイト） ===== */
.top-hd{background:linear-gradient(135deg,#1a1a2e,#23314e);color:#fff;padding:18px max(14px,env(safe-area-inset-left)) 16px;position:sticky;top:0;z-index:30}
.top-hd h1{font-size:1.15rem;font-weight:800;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.searchbar{display:flex;gap:8px}
.searchbar input{flex:1;min-width:0;font-size:.95rem;padding:9px 13px;border:none;border-radius:8px;background:#fff;color:#222}
.searchbar button{flex:0 0 auto;background:#0066cc;color:#fff;border:none;border-radius:8px;padding:0 16px;font-weight:700;font-size:.9rem;cursor:pointer}
.facetbar{padding:12px max(14px,env(safe-area-inset-left));background:#fff;border-bottom:1px solid #e3e6ea}
.facet-row{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0;align-items:center}
.facet-lab{font-size:.66rem;font-weight:800;color:#9099a6;width:3.4em;flex:0 0 auto}
.fc{font-size:.74rem;border-radius:99px;padding:3px 11px;border:1px solid #d4dae3;background:#f5f7fa;color:#566;cursor:pointer;text-decoration:none;white-space:nowrap}
.fc .n{opacity:.55;font-size:.66rem;margin-left:3px}
.fc.bun{color:#2e6e5b;border-color:#bcd6cc;background:#eef7f3}
.fc.place{color:#1668a8;border-color:#bcd4ea;background:#eaf3fb}
.fc.era{color:#8a5a1a;border-color:#e2cda0;background:#faf2e2}
.fc.use{color:#6a3a9a;border-color:#d8c8ec;background:#f3edfa}
.fc.active{background:#0066cc!important;color:#fff!important;border-color:#0066cc!important}
.fc.ch{color:#0a6f6a;border-color:#bcdedb;background:#eaf6f4}
.fc-more{font-size:.7rem;font-weight:700;color:#6a7385;text-decoration:none;padding:3px 8px;white-space:nowrap;align-self:center}
.facet-detail{display:flex;flex-wrap:wrap;gap:6px;margin:1px 0 6px;padding:7px 0 2px 3.4em;border-top:1px dashed #e1e5ea}
.facet-detail[hidden]{display:none}
.facet-detail .fc.raw{font-size:.7rem;padding:2px 9px}
.result-meta{padding:12px max(14px,env(safe-area-inset-left)) 0;font-size:.78rem;color:#677}
.grid{display:grid;grid-template-columns:1fr;gap:8px;padding:12px max(14px,env(safe-area-inset-left)) 40px}
@media(min-width:760px){.grid{grid-template-columns:1fr 1fr}}
.vcard{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 1px 3px rgba(20,30,60,.07);text-decoration:none;color:inherit;display:flex;flex-direction:row;transition:.15s}
.vcard:active{transform:scale(.99)}
.vcard .thumb{flex:0 0 auto;width:120px;height:68px;object-fit:cover;background:#dde;align-self:flex-start}
.vcard .body{padding:9px 12px;display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.vcard .vt{font-size:.88rem;font-weight:700;line-height:1.35;color:#1a1a2e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vcard .vhook{font-size:.76rem;color:#5a6470;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.vcard .vlead{font-size:.78rem;color:#4f5864;line-height:1.55;margin:2px 0 0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.vcard .vsum{list-style:none;display:flex;flex-direction:column;gap:3px;margin:2px 0 0}
.vcard .vsum li{font-size:.75rem;color:#56606c;line-height:1.45;padding-left:.95em;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vcard .vsum li::before{content:"";position:absolute;left:.15em;top:.62em;width:4px;height:4px;border-radius:50%;background:#9bb0c4}
.vcard .vhit{margin:5px 0 0;font-size:.72rem;color:#4a5a6a;background:#eef5fb;border-left:3px solid #6aa9e0;padding:3px 7px;border-radius:4px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vcard .vhit b{color:#2c6cb0;font-weight:700}
.vcard .vhit mark{background:#ffe39a;color:#33414f;padding:0 1px;border-radius:2px}
.vcard .vmeta{margin-top:auto;display:flex;flex-wrap:wrap;gap:5px;align-items:center;font-size:.66rem;color:#8893a2}
.vcard .vch{background:#16A085;color:#fff;padding:1px 8px;border-radius:9px;font-weight:600}
.vcard .vdur{background:#1a1a2e;color:#fff;padding:1px 6px;border-radius:4px;font-weight:700}
.vcard .vk{background:#fbeedd;color:#a85518;padding:1px 7px;border-radius:5px;font-weight:700}
.pager{display:flex;justify-content:center;gap:10px;padding:0 14px 50px}
.pager button{background:#fff;border:1px solid #cdd4de;border-radius:8px;padding:8px 16px;font-weight:700;font-size:.85rem;cursor:pointer;color:#334}
.pager button:disabled{opacity:.4;cursor:default}
.empty{padding:50px 20px;text-align:center;color:#9099a6}

/* ===== 個別ページ（v3レイアウト） ===== */
.back{display:inline-flex;align-items:center;gap:5px;color:#fff;text-decoration:none;font-size:.8rem;font-weight:600;opacity:.85;margin-bottom:8px}
.hd{background:linear-gradient(135deg,#1a1a2e,#23314e);color:#fff;padding:14px max(14px,env(safe-area-inset-left)) 14px}
.hd h1{font-size:1.18rem;font-weight:800;line-height:1.45;margin-bottom:8px}
.hd .meta{display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:.78rem;color:#b6bfd6}
.ch{padding:2px 9px;border-radius:11px;background:#16A085;color:#fff;font-weight:600;font-size:.74rem}
.yt{display:inline-flex;gap:4px;align-items:center;background:#c0392b;color:#fff;padding:3px 11px;border-radius:4px;font-size:.76rem;font-weight:600;text-decoration:none;margin-left:auto}
.hd-main{display:flex;gap:12px;align-items:flex-start}
.hd-text{flex:1;min-width:0}
.hd-thumb{flex:0 0 auto;width:124px;height:70px;object-fit:cover;border-radius:7px;background:#33405a}
.dur-badge{background:rgba(255,255,255,.18);color:#fff;padding:2px 9px;border-radius:11px;font-weight:700;font-size:.74rem}
.dash{background:#fff;padding:14px max(14px,env(safe-area-inset-left))}
.hook{font-size:1.04rem;font-weight:700;color:#a85518;line-height:1.6;margin-bottom:10px}
.three{list-style:none;display:flex;flex-direction:column;gap:7px;margin-bottom:10px;counter-reset:li}
.three li{display:flex;gap:.5em;align-items:flex-start;font-size:.9rem;line-height:1.5;color:#333}
.three li::before{content:counter(li);counter-increment:li;flex:0 0 auto;width:1.3em;height:1.3em;margin-top:.1em;background:#0066cc;color:#fff;border-radius:50%;font-size:.64rem;display:flex;align-items:center;justify-content:center;font-weight:700}
.dash .facet-row .facet-lab{width:auto;margin-right:2px}
.tt-row{margin-bottom:4px}
.ttag{font-size:.78rem;font-weight:700;color:#1a4b8a;background:#e9f0fb;border:1px solid #c2d6f0;border-radius:7px;padding:3px 11px;text-decoration:none;white-space:nowrap}
.ttag:active{background:#d6e4f7}
.chip{font-size:.72rem;border-radius:99px;padding:2px 10px;border:1px solid #d4dae3;background:#f5f7fa;color:#566;text-decoration:none}
.chip.bun{color:#2e6e5b;border-color:#bcd6cc;background:#eef7f3}
.chip.place{color:#1668a8;border-color:#bcd4ea;background:#eaf3fb}
.chip.era{color:#8a5a1a;border-color:#e2cda0;background:#faf2e2}
.chip.use{color:#6a3a9a;border-color:#d8c8ec;background:#f3edfa}
nav.spy{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-bottom:1px solid #dde1e7;display:flex;gap:4px;padding:7px max(8px,env(safe-area-inset-left))}
nav.spy a{flex:1 1 0;min-width:0;text-align:center;font-size:.8rem;font-weight:700;color:#67707d;text-decoration:none;padding:6px 6px;border-radius:99px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
nav.spy a .c{font-size:.66rem;opacity:.7;margin-left:3px}
nav.spy a.active{background:#0066cc;color:#fff}
section{padding:18px max(14px,env(safe-area-inset-left)) 6px;scroll-margin-top:50px}
.s-title{font-size:1.06rem;font-weight:800;color:#1a1a2e;display:flex;align-items:baseline;gap:8px;margin-bottom:4px}
.s-title .c{font-size:.78rem;color:#9099a6;font-weight:600}
.s-sub{font-size:.72rem;color:#9099a6;margin-bottom:12px}
.ts{display:inline-flex;align-items:center;gap:4px;background:#e8f0fe;color:#1a73e8;padding:4px 9px;border-radius:5px;font-size:.76rem;font-weight:700;text-decoration:none;white-space:nowrap}
.ts-play{font-size:.62rem}.ts:active{background:#c2d8fc}
.tl{position:relative;padding-left:4px}
.tl::before{content:"";position:absolute;left:30px;top:6px;bottom:6px;width:2px;background:linear-gradient(#cdd6e6,#e6d6c8)}
.ti{position:relative;display:grid;grid-template-columns:58px 1fr;gap:9px;margin:7px 0}
.ti-rail{display:flex;flex-direction:column;align-items:flex-start;gap:3px;z-index:1}
.seg-len{font-size:.62rem;color:#9aa3b0;font-weight:600;padding-left:3px;white-space:nowrap}
.ti-card{background:#fff;border-radius:9px;padding:11px 13px;box-shadow:0 1px 3px rgba(20,30,60,.07)}
.ti.topic .ti-card{border-left:4px solid #0066cc}
.ti.aside .ti-card{border-left:4px solid #b0b6c0;background:#fafbfc}
.ti-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:5px}
.ti-tag{font-size:.64rem;font-weight:800;border-radius:4px;padding:2px 7px;flex-shrink:0}
.ti-tag.topic{background:#e3edfb;color:#1659b3}.ti-tag.aside{background:#eceef1;color:#6a727e}
.ti-name{font-size:.96rem;font-weight:700;color:#1a1a2e;line-height:1.4}
.ti.aside .ti-name{font-size:.9rem;font-weight:600;color:#3a4150}
ul.pts{list-style:none;font-size:.88rem;line-height:1.75;color:#4a505c}
ul.pts li{margin:2px 0;padding-left:1.05em;text-indent:-1.05em}ul.pts li::before{content:"\30FB";color:#aab}
.filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.fchip{font-size:.74rem;font-weight:700;border:1px solid #e0c8a0;background:#fff;color:#a85518;border-radius:99px;padding:4px 12px;cursor:pointer}
.fchip.active{background:#b5651d;color:#fff;border-color:#b5651d}
.kgrid{display:grid;grid-template-columns:1fr;gap:9px}@media(min-width:620px){.kgrid{grid-template-columns:1fr 1fr}}
.kcard{background:#fff;border-radius:9px;padding:11px 13px;box-shadow:0 1px 3px rgba(20,30,60,.07);border-top:3px solid #b5651d}
.k-head{display:flex;align-items:center;gap:6px;margin-bottom:5px;flex-wrap:wrap}
.ktype{font-size:.64rem;font-weight:800;color:#fff;background:#b5651d;border-radius:4px;padding:2px 8px}
.conf{font-size:.64rem;font-weight:800;border-radius:4px;padding:2px 7px}
.era-tag{font-size:.62rem;font-weight:700;color:#8a5a1a;background:#faf2e2;border:1px solid #e2cda0;border-radius:4px;padding:1px 6px}
.neta{display:inline-flex;align-items:center;gap:3px;margin-left:auto}
.neta-lab{font-size:.56rem;font-weight:700;color:#b0a48c;letter-spacing:.02em}
.neta-stars{color:#e0a040;font-size:.7rem;letter-spacing:.5px}
.k-title{font-size:.95rem;font-weight:800;color:#1a1a2e;line-height:1.4;margin-bottom:3px}
.k-body{font-size:.86rem;line-height:1.7;color:#4a505c}
.k-note{margin-top:7px;background:#eef4fb;border-left:3px solid #4a8fd6;border-radius:0 6px 6px 0;padding:7px 10px;font-size:.8rem;line-height:1.6;color:#33506e}
.k-note-lab{display:block;font-size:.64rem;font-weight:800;color:#2f6aa8;margin-bottom:2px}
.k-ents{margin-top:7px;display:flex;flex-wrap:wrap;gap:5px}
.k-ents a{font-size:.7rem;color:#4a5e8a;background:#eef1f8;border:1px solid #d6deee;border-radius:5px;padding:1px 7px;text-decoration:none}
.rcard{display:flex;gap:10px;align-items:flex-start;background:#fff;border-radius:9px;padding:11px 13px;margin:8px 0;box-shadow:0 1px 3px rgba(20,30,60,.07)}
.r-cover{flex:0 0 auto;width:46px;height:auto;border-radius:3px;box-shadow:0 1px 4px rgba(20,30,60,.22)}
.r-body{flex:1;min-width:0}.r-title{font-size:.94rem;font-weight:800;color:#1a1a2e}
.rbadge{font-size:.64rem;font-weight:800;border-radius:4px;padding:2px 7px}
.r-au{font-size:.8rem;font-weight:600;color:#667}.r-ctx{font-size:.83rem;color:#667;margin-top:3px;line-height:1.6}
.lib-badge{display:inline-block;margin-top:6px;font-size:.72rem;font-weight:700;color:#1d6f4e;background:#e6f5ec;border:1px solid #b9e0c9;border-radius:6px;padding:2px 9px}
.lib-add{margin-top:7px;font-size:.74rem;font-weight:700;color:#fff;background:#2e8b57;border:none;border-radius:6px;padding:5px 12px;cursor:pointer}
.lib-add:hover{background:#287a4c}.lib-add:disabled{opacity:.6;cursor:default}
.lib-add.done{background:#eef3ee;color:#2e7d4f;border:1px solid #bfe0cb;cursor:default}
.r-access{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.acc-link{font-size:.74rem;font-weight:700;color:#a85518;background:#fdf3e9;border:1px solid #ecd7c0;border-radius:6px;padding:3px 9px;text-decoration:none;white-space:nowrap}
.acc-link:active{background:#f6e6d4}
.ent-group{margin-bottom:10px}.ent-label{font-size:.7rem;font-weight:800;color:#8a93ab;margin-bottom:5px}
.ent-row{display:flex;flex-wrap:wrap;gap:6px}
.ent{font-size:.82rem;background:#fff;border:1px solid #d2d8e4;border-radius:7px;padding:4px 11px;text-decoration:none;color:#33405a}
.note{font-size:.72rem;color:#9099a6;margin-top:10px;line-height:1.6}
.foot{padding:20px 16px 40px;font-size:.72rem;color:#9099a6;text-align:center;line-height:1.7}
