:root{--bg:#f6f6f6;--text:#202122;--muted:#54595d;--link:#0645ad;--link-hover:#0b0080;--border:#a2a9b1;--panel:#fff;--accent:#36c;--danger:#d33;--green:#14866d}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif}
.layout{display:flex;min-height:100vh}
.sidebar{width:300px;padding:16px;border-right:1px solid var(--border);background:#fff;position:fixed;left:0;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;z-index:10}
.sidebar .logo{font-weight:700;margin-bottom:10px}
.sidebar .logo img{display:block;max-width:100%;height:auto}
.sidebar .menu a{display:block;color:var(--link);text-decoration:none;padding:6px 0}
.sidebar .menu a:hover{color:var(--link-hover)}
.sidebar h2{font-size:14px;color:var(--muted);margin:16px 0 8px}
.sidebar .list{list-style:none;margin:0;padding:0}
.sidebar .list li{margin:4px 0}
.sidebar .list a{color:var(--link);text-decoration:none}
.sidebar .list a:hover{color:var(--link-hover)}
.content{flex:1;padding:24px;margin-left:300px}
.banner{text-align:center}
.sidebar .banner{width:100%;margin:0 auto}
.banner img{display:block;margin:0 auto;max-width:100%;height:auto}
.banner iframe{display:block;margin:0 auto}
.sidebar .banner iframe{width:100%;max-width:100%}
.topbar{display:flex;gap:12px;align-items:center;justify-content:space-between;background:#fff;border:1px solid var(--border);border-radius:6px;padding:8px 12px;margin-bottom:16px}
.topbar .left,.topbar .right{display:flex;gap:12px;align-items:center}
.topbar a{color:var(--link);text-decoration:none;padding:6px 8px;border-radius:4px}
.topbar a:hover{background:#f6f6f6;color:var(--link-hover)}
.container{max-width:980px;margin:0 auto}
h1{font-size:24px;margin:0 0 12px}
h2{font-size:18px;margin:20px 0 10px}
p{margin:0 0 12px;color:var(--muted)}
a{color:var(--link);text-decoration:none}
a:hover{color:var(--link-hover)}
.card{background:var(--panel);border:1px solid var(--border);border-radius:6px;padding:16px}
.card.banner{padding:8px}
.card.banner{overflow:visible;display:flex;align-items:center;justify-content:center}
.sidebar .card.banner{min-height:250px;width:100%}
.card.banner.size-300x250{width:100%;min-height:250px;margin:0 auto;padding:0}
.card.banner.size-300x250 img,.card.banner.size-300x250 iframe{width:300px !important;height:250px !important;display:block;margin:0 auto}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.cards{display:grid;gap:12px}
.toolbar{display:flex;gap:8px;align-items:center;justify-content:flex-start;margin:8px 0}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-block;background:#eaf3ff;border:1px solid var(--border);color:var(--text);padding:6px 10px;border-radius:16px}
.btn{display:inline-block;padding:8px 12px;border-radius:6px;background:var(--accent);color:#fff;border:1px solid #2a4b8d}
.btn:hover{filter:brightness(1.05)}
.topbar .right a.btn[href="/publish"]{background:#fff;color:var(--link);border:1px solid var(--border)}
.topbar .right a.btn[href="/publish"]:hover{background:#fff;color:var(--link)}
.btn.secondary{background:var(--green);border-color:#0e5f4f}
.btn.danger{background:var(--danger);border-color:#a00}
input,select,textarea{width:100%;padding:8px 10px;border-radius:6px;border:1px solid var(--border);background:#fff;color:var(--text);outline:none}
input::placeholder,textarea::placeholder{color:var(--muted)}
form{display:grid;gap:10px;max-width:720px}
form label{display:block;margin-top:8px;margin-bottom:4px;color:var(--muted)}
.inline{display:flex;gap:10px;align-items:center}
.list{display:grid;gap:8px}
.nav{display:flex;gap:8px;margin:16px 0}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:8px;border-bottom:1px solid var(--border)}
.notice{padding:10px;border-radius:6px;background:#eaf3ff;color:#202122;border:1px solid #a2a9b1}
article{display:grid;gap:12px}
/* Tag sphere */
.sphere{position:relative;width:240px;height:240px;margin:10px auto 16px;perspective:800px;overflow:hidden;transform:scale(.80);transform-origin:50% 50%;border-radius:50%;background:transparent}
.sphere a{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform,opacity;transition:transform .1s linear,opacity .1s linear}
.sphere{cursor:grab}
.sphere.grabbing{cursor:grabbing}
@media (max-width:900px){.sidebar{position:relative;height:auto}.layout{display:block}.content{padding:16px;margin-left:0}}
.scroll-top{position:fixed;right:16px;bottom:16px;width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:var(--accent);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:20}
.scroll-top:hover{filter:brightness(1.05)}
/* Ads overlay */
.ad-backdrop{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;z-index:9999}
.ad-modal{background:#fff;border:1px solid var(--border);border-radius:6px;max-width:700px;max-height:80vh;overflow:auto;padding:12px;position:relative}
.ad-close{position:absolute;right:8px;top:8px;border:none;background:#eaecef;border:1px solid var(--border);border-radius:4px;padding:4px 8px;cursor:pointer}
