:root{
--bg:#f4f7fc;--surface:#ffffff;--surface2:#e9eff8;--surface3:#dce6f4;--text:#0a1830;--muted:#5a6b88;--line:#d6e0ee;
--accent:#1d4ed8;--accent-2:#0b3d91;--accent-soft:#dbe7ff;--on-accent:#ffffff;--danger:#c62828;--danger-soft:#fde8e8;--ok:#15803d;--ok-soft:#e3f5e9;
--read:#7b8aa3;--shadow:0 1px 2px rgba(10,24,48,.06),0 4px 16px rgba(10,24,48,.06);--radius:14px;--nav-h:64px;--top-h:58px;
--font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--serif:Charter,"Iowan Old Style","Palatino Linotype",Georgia,serif;
color-scheme:light}
:root[data-theme=amoled]{
--bg:#000000;--surface:#070b14;--surface2:#0c1424;--surface3:#13203a;--text:#e8eef9;--muted:#8797b3;--line:#152238;
--accent:#3b82f6;--accent-2:#7cb0ff;--accent-soft:#0e2446;--on-accent:#ffffff;--danger:#f87171;--danger-soft:#2a0d0d;--ok:#4ade80;--ok-soft:#0b2415;
--read:#5d6c86;--shadow:none;color-scheme:dark}
@media (prefers-color-scheme:dark){
:root[data-theme=auto]{
--bg:#000000;--surface:#070b14;--surface2:#0c1424;--surface3:#13203a;--text:#e8eef9;--muted:#8797b3;--line:#152238;
--accent:#3b82f6;--accent-2:#7cb0ff;--accent-soft:#0e2446;--on-accent:#ffffff;--danger:#f87171;--danger-soft:#2a0d0d;--ok:#4ade80;--ok-soft:#0b2415;
--read:#5d6c86;--shadow:none;color-scheme:dark}}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 var(--font);overscroll-behavior-y:contain;-webkit-tap-highlight-color:transparent;min-height:100vh}
body.noscroll{overflow:hidden}
a{color:var(--accent-2)}
button,input,select,textarea{font:inherit;color:inherit}
.ic{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}

.top{position:sticky;top:0;z-index:20;height:calc(var(--top-h) + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));display:flex;align-items:center;gap:8px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:20px;letter-spacing:-.02em;color:var(--text);text-decoration:none;cursor:pointer;border:0;background:none;padding:0}
.brand img{width:30px;height:30px;border-radius:8px}
.brand span b{color:var(--accent)}
.topnav{display:none;gap:4px;margin-left:24px}
.topnav a{padding:8px 14px;border-radius:999px;color:var(--muted);text-decoration:none;font-weight:600;font-size:15px}
.topnav a.on{background:var(--accent-soft);color:var(--accent-2)}
.spacer{flex:1}
.iconbtn{width:42px;height:42px;display:inline-grid;place-items:center;border-radius:12px;border:0;background:transparent;color:var(--text);cursor:pointer;flex:none}
.iconbtn:hover{background:var(--surface2)}
.iconbtn.on{color:var(--accent)}
.iconbtn:disabled{opacity:.5;cursor:default}
.spin .ic{animation:spin 0.9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

.bottomnav{position:fixed;left:0;right:0;bottom:0;z-index:20;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(4,1fr);background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--line)}
.bottomnav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);text-decoration:none;font-size:11.5px;font-weight:600;position:relative}
.bottomnav a.on{color:var(--accent)}
.bottomnav a.on::before{content:"";position:absolute;top:0;width:36px;height:3px;border-radius:0 0 3px 3px;background:var(--accent)}
.badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:var(--on-accent);font-size:11px;font-weight:700;display:inline-grid;place-items:center}
.bottomnav .badge{position:absolute;top:6px;left:calc(50% + 6px)}

main{max-width:1180px;margin:0 auto;padding:12px max(16px,env(safe-area-inset-right)) calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.searchbar{display:flex;gap:8px;align-items:center;margin:4px 0 10px}
.searchbar input{flex:1}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:4px 0 12px;margin:0 -16px;padding-left:16px;padding-right:16px}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap}
.chip .dot{width:9px;height:9px;border-radius:50%}
.chip .n{color:var(--muted);font-weight:600;font-size:12.5px}
.chip.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.chip.on .n{color:inherit;opacity:.85}
.viewhead{display:flex;align-items:center;gap:10px;margin:6px 0 12px}
.viewhead h1{font-size:24px;margin:0;letter-spacing:-.02em}
.viewhead .spacer{flex:1}

.newbanner{position:sticky;top:calc(var(--top-h) + env(safe-area-inset-top) + 10px);z-index:15;display:flex;justify-content:center;pointer-events:none;height:0;overflow:visible}
.newbanner button{pointer-events:auto;display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 18px;border-radius:999px;border:0;background:var(--accent);color:var(--on-accent);font-weight:700;font-size:14px;box-shadow:0 6px 24px rgba(29,78,216,.35);cursor:pointer}
.ptr{position:fixed;left:50%;top:calc(var(--top-h) + env(safe-area-inset-top) - 36px);margin-left:-20px;width:40px;height:40px;border-radius:50%;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;color:var(--muted);z-index:19;opacity:0;pointer-events:none}
.ptr.ready{color:var(--accent)}

.list{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.hero{position:relative;display:block;border-radius:var(--radius);overflow:hidden;background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--line);cursor:pointer;margin-bottom:10px}
.hero .th{aspect-ratio:16/9;border-radius:0}
.hero .txt{padding:14px 16px 16px}
.hero .ttl{font-size:21px;line-height:1.25;margin:6px 0 6px;letter-spacing:-.015em;font-weight:750}
.hero .sum{-webkit-line-clamp:3}
.row{display:flex;gap:14px;padding:14px 4px;border-bottom:1px solid var(--line);cursor:pointer;align-items:flex-start;border-radius:10px}
.row .th{width:108px;height:80px;border-radius:10px}
.row .txt{flex:1;min-width:0}
.row .ttl{font-size:16px;line-height:1.3;margin:3px 0 0;font-weight:680;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.row .sum{display:none}
.row.sel,.hero.sel{outline:2px solid var(--accent);outline-offset:2px}
.meta{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);min-width:0}
.meta .src{font-weight:700;color:var(--accent-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:60%}
.meta .ic{color:var(--accent)}
.meta time{white-space:nowrap;flex:none}
.sum{color:var(--muted);font-size:14.5px;margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.read .ttl{color:var(--read);font-weight:560}
.read .th img{filter:saturate(.6) brightness(.85)}
.th{position:relative;overflow:hidden;background:var(--surface3);flex:none}
.th img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .25s}
.th.ok img{opacity:1}
.ph{position:absolute;inset:0;display:grid;place-items:center;color:rgba(255,255,255,.92);font-weight:800;font-size:28px;letter-spacing:-.03em}
.hero .ph{font-size:64px}
.sentinel{height:40px}
.empty{text-align:center;color:var(--muted);padding:60px 20px}
.empty .ic{color:var(--accent);margin-bottom:8px}
.empty h2{color:var(--text);font-size:19px;margin:8px 0}
.loadingbar{height:3px;background:linear-gradient(90deg,transparent,var(--accent),transparent);background-size:200% 100%;animation:lb 1s linear infinite;border-radius:3px;margin:8px 0}
@keyframes lb{from{background-position:200% 0}to{background-position:-200% 0}}
.skel{background:var(--surface2);border-radius:10px;animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.5}}

.reader{position:fixed;inset:0;z-index:40;background:var(--bg);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.rbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:4px;height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.rprogress{position:absolute;left:0;bottom:-1px;height:2px;background:var(--accent);width:0}
.rwrap{max-width:720px;margin:0 auto;padding:0 20px calc(48px + env(safe-area-inset-bottom))}
.rhero{margin:0 -20px 18px;aspect-ratio:16/9;max-height:420px;border-radius:0}
.rmeta{font-size:13.5px;color:var(--muted);margin:18px 0 6px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.rmeta .src{color:var(--accent-2);font-weight:700}
.rtitle{font-size:28px;line-height:1.2;letter-spacing:-.02em;margin:4px 0 18px;font-weight:780}
.rbody{font-family:var(--serif);font-size:19px;line-height:1.72;overflow-wrap:anywhere}
.rbody img{max-width:100%;height:auto;border-radius:10px;display:block;margin:18px auto;background:var(--surface2)}
.rbody figure{margin:18px 0}
.rbody figcaption{font-family:var(--font);font-size:13.5px;color:var(--muted);text-align:center}
.rbody h1,.rbody h2,.rbody h3,.rbody h4{font-family:var(--font);line-height:1.25;letter-spacing:-.01em;margin:1.6em 0 .5em}
.rbody blockquote{margin:1.2em 0;padding:.2em 0 .2em 1em;border-left:3px solid var(--accent);color:var(--muted)}
.rbody pre{white-space:pre-wrap;background:var(--surface2);padding:12px;border-radius:10px;font-size:14px;overflow-x:auto}
.rbody code{font-size:.88em;background:var(--surface2);padding:.1em .3em;border-radius:5px}
.rbody table{border-collapse:collapse;width:100%;font-family:var(--font);font-size:15px;display:block;overflow-x:auto}
.rbody td,.rbody th{border:1px solid var(--line);padding:6px 8px}
.rbody hr{border:0;border-top:1px solid var(--line);margin:2em 0}
.rbody a{color:var(--accent-2);text-decoration-thickness:1px;text-underline-offset:2px}
.rnote{font-family:var(--font);font-size:14px;color:var(--muted);background:var(--surface2);padding:10px 14px;border-radius:10px;margin:0 0 16px}
.rfoot{margin-top:36px;display:flex;flex-wrap:wrap;gap:10px}
.rlabels{display:flex;gap:6px;flex-wrap:wrap;margin:-6px 0 14px}
.tag{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;background:var(--surface2);font-size:12.5px;font-weight:650;color:var(--text)}
.tag .dot{width:8px;height:8px;border-radius:50%}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:42px;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--text);font-weight:650;font-size:15px;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn:hover{background:var(--surface2)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn.primary:hover{filter:brightness(1.08)}
.btn.danger{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 40%,var(--line))}
.btn.danger:hover{background:var(--danger-soft)}
.btn.small{height:34px;padding:0 12px;font-size:13.5px;border-radius:10px}
.btn.block{width:100%}
.btn:disabled{opacity:.55;cursor:default}
input[type=text],input[type=password],input[type=url],input[type=search],input[type=number],select,textarea{width:100%;height:46px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface);outline:none;font-size:16px}
textarea{height:auto;padding:12px 14px;min-height:90px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 25%,transparent)}
label.field{display:block;margin:0 0 14px}
label.field>span{display:block;font-size:13.5px;font-weight:650;color:var(--muted);margin:0 0 6px}
.hint{font-size:13px;color:var(--muted);margin:6px 0 0}
.err{color:var(--danger);font-size:14px;margin:8px 0 0;min-height:1em}
.row2{display:flex;gap:10px;flex-wrap:wrap}
.row2>*{flex:1 1 180px}

.auth{min-height:100vh;display:grid;place-items:center;padding:24px 16px}
.authcard{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:28px 24px;box-shadow:var(--shadow)}
.authcard .brand{justify-content:center;font-size:26px;margin-bottom:6px}
.authcard .brand img{width:40px;height:40px;border-radius:11px}
.authcard h1{font-size:18px;text-align:center;margin:0 0 4px}
.authcard p.sub{text-align:center;color:var(--muted);margin:0 0 22px;font-size:14.5px}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;margin:16px 0}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.otp{letter-spacing:.35em;text-align:center;font-size:22px!important;font-weight:700}

.section{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px;margin:0 0 16px;box-shadow:var(--shadow)}
.section>h2{font-size:17px;margin:0 0 4px;display:flex;align-items:center;gap:8px}
.section>h2 .ic{color:var(--accent)}
.section>p.desc{color:var(--muted);font-size:14px;margin:0 0 14px}
.setrow{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.setrow:first-of-type{border-top:0}
.setrow{flex-wrap:wrap}
.setrow .grow{flex:1 1 200px;min-width:0}
.setrow .t{font-weight:650}
.setrow .d{color:var(--muted);font-size:13.5px;overflow-wrap:anywhere}
.seg{display:inline-flex;background:var(--surface2);border-radius:12px;padding:3px;gap:2px}
.seg button{border:0;background:transparent;height:36px;padding:0 14px;border-radius:9px;font-weight:650;font-size:14px;color:var(--muted);cursor:pointer}
.seg button.on{background:var(--surface);color:var(--accent-2);box-shadow:var(--shadow)}
.switch{position:relative;width:50px;height:30px;flex:none}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch span{position:absolute;inset:0;border-radius:15px;background:var(--surface3);transition:.2s;cursor:pointer}
.switch span::after{content:"";position:absolute;left:3px;top:3px;width:24px;height:24px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.switch input:checked+span{background:var(--accent)}
.switch input:checked+span::after{transform:translateX(20px)}
.switch input:focus-visible+span{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 35%,transparent)}
.pill{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:700;background:var(--surface2);color:var(--muted)}
.pill.ok{background:var(--ok-soft);color:var(--ok)}
.pill.warn{background:var(--danger-soft);color:var(--danger)}
.pill.acc{background:var(--accent-soft);color:var(--accent-2)}
.chiplist{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chiplist .tag button{border:0;background:none;padding:0;margin:0 -4px 0 0;display:grid;place-items:center;cursor:pointer;color:var(--muted)}
.qr{display:block;width:220px;height:220px;border-radius:14px;background:#fff;margin:6px auto 14px;image-rendering:pixelated}
.secret{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:15px;letter-spacing:.06em;background:var(--surface2);padding:12px 14px;border-radius:12px;word-break:break-all;flex:1;user-select:all}
.copyrow{display:flex;gap:8px;align-items:stretch;margin:0 0 14px}
.codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:15px;background:var(--surface2);padding:14px;border-radius:12px;margin:0 0 12px;user-select:all}

.lgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.lcard{display:flex;align-items:center;gap:10px;padding:12px 12px 12px 14px;border-radius:14px;background:var(--surface2);cursor:pointer;min-width:0}
.lcard .dot{width:12px;height:12px;border-radius:50%;flex:none}
.lcard .name{font-weight:700;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lcard .n{color:var(--muted);font-size:13px;font-weight:650}
.lcard .iconbtn{width:34px;height:34px}
.feed{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.feed:first-child{border-top:0}
.feed .fav{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#fff;font-weight:800;flex:none}
.feed .grow{flex:1;min-width:0}
.feed .t{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feed .u{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feed .labels{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.feed .labels .tag{height:22px;font-size:11.5px;padding:0 8px}
.feed .e{font-size:12.5px;color:var(--danger)}
.checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin:0 0 12px}
.check{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:var(--surface2);cursor:pointer;font-weight:600;font-size:14px}
.check input{width:18px;height:18px;accent-color:var(--accent);margin:0}
.check.dis{opacity:.6;cursor:default}
.colors{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.colors button{width:34px;height:34px;border-radius:50%;border:3px solid transparent;cursor:pointer}
.colors button.on{border-color:var(--text)}

dialog.dlg{border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--text);padding:0;width:min(460px,calc(100vw - 24px));max-height:calc(100vh - 40px);box-shadow:0 20px 60px rgba(0,0,0,.4)}
dialog.dlg::backdrop{background:rgba(0,0,0,.6);backdrop-filter:blur(3px)}
dialog.dlg form{padding:20px}
dialog.dlg h3{margin:0 0 14px;font-size:18px}
dialog.dlg .acts{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap}
.kbd{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;font-size:14.5px}
.kbd kbd{font-family:ui-monospace,monospace;background:var(--surface2);border:1px solid var(--line);border-radius:6px;padding:1px 8px;font-size:13px;text-align:center}

#toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));z-index:60;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:calc(100% - 32px);max-width:420px}
.toast{background:var(--text);color:var(--bg);padding:11px 16px;border-radius:12px;font-size:14.5px;font-weight:600;box-shadow:0 8px 30px rgba(0,0,0,.35);animation:tin .2s ease-out}
.toast.err{background:var(--danger);color:#fff}
@keyframes tin{from{transform:translateY(8px);opacity:0}}

@media (min-width:760px){
.topnav{display:flex}
.bottomnav{display:none}
main{padding-bottom:48px}
#toasts{bottom:24px}
.row .th{width:168px;height:106px;border-radius:12px}
.row .ttl{font-size:17.5px;-webkit-line-clamp:2}
.row .sum{display:-webkit-box;margin-top:4px}
.hero{display:grid;grid-template-columns:1.35fr 1fr;align-items:stretch}
.hero .th{aspect-ratio:auto;min-height:320px;height:100%}
.hero .txt{padding:24px 26px;display:flex;flex-direction:column;justify-content:center}
.hero .ttl{font-size:28px}
.hero .sum{-webkit-line-clamp:5;font-size:15.5px}
.rtitle{font-size:36px}
.rhero{margin:22px 0 10px;border-radius:16px}
.rwrap{padding-top:4px}
}
@media (min-width:1100px){
.list{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:28px}
.list .hero{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
