:root{
  --bg:#0b1020;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.68);
  --border:rgba(255,255,255,.12);
  --card:rgba(255,255,255,.04);
  --card2:rgba(255,255,255,.06);
  --primary:#7c5cff;
  --primary2:#25d6ff;
  --shadow:0 18px 50px rgba(0,0,0,.35);
  --r:16px;
  --max:1140px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(124,92,255,.35), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(37,214,255,.22), transparent 55%),
    radial-gradient(1200px 650px at 70% 120%, rgba(255,77,109,.16), transparent 55%),
    var(--bg);
}
a{color:inherit;text-decoration:none}
a:hover{color:rgba(255,255,255,.98)}
code{background:rgba(255,255,255,.08);padding:2px 6px;border-radius:8px}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.container{max-width:var(--max);margin:0 auto;padding:28px 18px 56px}
body[data-page="explore"] .container{max-width:1480px}

.topbar{
  position:sticky;top:0;z-index:50;
  backdrop-filter:blur(14px);
  background:linear-gradient(to bottom, rgba(11,16,32,.86), rgba(11,16,32,.55));
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;
}
.brand{display:flex;align-items:center;gap:10px}
.brand-mark{
  width:34px;height:34px;border-radius:12px;
  display:grid;place-items:center;
  background:url("./site-icon.jpeg") center/cover no-repeat;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 10px 30px rgba(0,0,0,.22);
  color:transparent;
  font-weight:900;
}
.brand-text{font-weight:800;letter-spacing:.2px}
.topnav{display:flex;align-items:center;gap:14px;color:var(--muted)}
.topnav a{padding:8px 10px;border-radius:12px}
.topnav a:hover{background:rgba(255,255,255,.06);color:var(--text)}
.topnav .pill{border:1px solid var(--border);background:rgba(255,255,255,.05)}

.hero{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;align-items:start;margin-top:10px}
@media (max-width:960px){.hero{grid-template-columns:1fr}}
.hero-left{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:var(--r);
  padding:22px;
  box-shadow:var(--shadow);
}
.hero h1{margin:0 0 10px;font-size:34px;line-height:1.12}
.sub{margin:0 0 16px;color:var(--muted)}

/* New simplified homepage */
.home{min-height:calc(100vh - 190px)}
.home-center{
  max-width:820px;
  margin:18px auto 18px;
  border:1px solid var(--border);
  background:var(--card);
  border-radius:var(--r);
  padding:28px 22px;
  box-shadow:var(--shadow);
  text-align:center;
}
.home-title{margin:0;font-size:40px;line-height:1.08}
.home-sub{margin:10px 0 16px;color:var(--muted)}
.home-query{justify-content:center}
.home-query input{max-width:620px}
.home-meta{margin-top:10px;color:var(--muted);display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.home-meta a{text-decoration:underline}
.weekly{margin-top:18px}
/* Weekly: dopamine palette (only this section changes) */
.home > .weekly{
  border:1px solid rgba(255,255,255,.14);
  border-radius:var(--r);
  padding:16px;
  background:
    radial-gradient(700px 220px at 20% 0%, rgba(255,64,129,.22), transparent 62%),
    radial-gradient(700px 240px at 85% 10%, rgba(0,229,255,.18), transparent 62%),
    radial-gradient(700px 260px at 55% 120%, rgba(124,92,255,.16), transparent 62%),
    rgba(255,255,255,.03);
}
.home > .weekly .results-head{margin-bottom:12px}
.home > .weekly .results-head h2{
  background:linear-gradient(90deg, rgba(255,64,129,.98), rgba(0,229,255,.92), rgba(124,92,255,.92));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.home > .weekly .btn.primary{
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(255,64,129,.92), rgba(0,229,255,.72));
}
.home > .weekly .btn.primary:hover{filter:brightness(1.06)}
.home > .weekly .btn:not(.primary){
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(124,92,255,.22), rgba(255,255,255,.04));
}

.query{display:flex;gap:10px;align-items:center;margin:14px 0 12px}
.query input{
  flex:1;min-width:0;height:48px;padding:0 14px;border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  outline:none;
}
.query input:focus{border-color:rgba(124,92,255,.55);box-shadow:0 0 0 4px rgba(124,92,255,.18)}

.btn{
  height:44px;padding:0 14px;border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
}
.btn:hover{background:rgba(255,255,255,.08)}
.btn.primary{
  border-color:rgba(124,92,255,.45);
  background:linear-gradient(135deg, rgba(124,92,255,.92), rgba(37,214,255,.55));
}
.btn.primary:hover{filter:brightness(1.05)}
.btn.ghost{background:transparent}
.btn.is-on{border-color:rgba(37,214,255,.55);background:rgba(37,214,255,.16)}
.btn.is-loading{cursor:wait;opacity:.92}
.btn.is-loading::after{
  content:"";
  display:inline-block;
  width:16px;
  height:16px;
  margin-left:8px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.28);
  border-top-color: rgba(255,255,255,.92);
  animation: spin .9s linear infinite;
  vertical-align:-3px;
}
@keyframes spin{to{transform:rotate(360deg)}}

.chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}
.chip{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.86);
  height:34px;padding:0 10px;border-radius:999px;
  cursor:pointer;display:flex;align-items:center;gap:8px;
  user-select:none;
}
.chip:hover{background:rgba(255,255,255,.06)}
.chip.is-on{border-color:rgba(124,92,255,.55);background:rgba(124,92,255,.18)}
.chip small{color:var(--muted);font-size:11px}

.airow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;justify-content:center}
.aihint{color:var(--muted);font-size:13px}

.prefs{margin-top:14px;border-top:1px dashed rgba(255,255,255,.14);padding-top:12px;color:var(--muted)}
.prefs summary{cursor:pointer;color:rgba(255,255,255,.82)}
.prefs-grid{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:760px){.prefs-grid{grid-template-columns:1fr}}
.field .label{font-size:13px;color:var(--muted);margin-bottom:8px}
.seg{display:flex;gap:8px;flex-wrap:wrap}
.seg-item{
  height:34px;padding:0 12px;border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.86);
  cursor:pointer;
}
.seg-item.is-on{border-color:rgba(37,214,255,.55);background:rgba(37,214,255,.16)}
.prefs input{
  width:100%;height:40px;padding:0 12px;border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  outline:none;
}

.coach{
  margin-top:14px;
  border:1px solid rgba(37,214,255,.22);
  background:linear-gradient(180deg, rgba(37,214,255,.08), rgba(255,255,255,.03));
  border-radius:var(--r);
  padding:14px;
}
.coach-top{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.coach-kicker{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.coach-step{font-weight:900}
.coach-note{color:var(--muted);font-size:13px}
.coach-bar{height:10px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;border:1px solid rgba(255,255,255,.10)}
.coach-bar-fill{height:100%;background:linear-gradient(90deg, rgba(124,92,255,.95), rgba(37,214,255,.75))}
.coach-q{padding:8px 0}
.coach-title{font-weight:900;margin-bottom:6px}
.coach-desc{color:var(--muted);font-size:13px;margin-bottom:10px;line-height:1.4}
.coach-free{
  width:100%;
  margin-top:10px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  padding:10px 12px;
  outline:none;
  resize:vertical;
}
.coach-free:focus{border-color:rgba(37,214,255,.45);box-shadow:0 0 0 4px rgba(37,214,255,.14)}
.coach-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.coach-spacer{flex:1}

.hero-right{display:flex;flex-direction:column;gap:12px}
.statcard,.hintcard{
  border:1px solid var(--border);
  border-radius:var(--r);
  padding:18px;
  background:var(--card);
}
.stat-title{color:var(--muted);font-size:13px}
.stat-value{font-size:32px;font-weight:900;margin-top:6px}
.stat-desc{color:var(--muted);margin-top:8px;line-height:1.4}
.hint-title{font-weight:800;margin-bottom:8px}
.hint-list{margin:0;padding-left:18px;color:var(--muted);line-height:1.5}

.results{margin-top:18px}
.results-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.results-head h2{margin:0;font-size:18px}
.results-actions{display:flex;gap:10px;align-items:center}

.panel{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:var(--r);
  padding:18px;
  box-shadow:var(--shadow);
}
.panel-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}
.panel-head h1{margin:0;font-size:22px}
.panel-meta{color:var(--muted)}
.dot{margin:0 6px}

.searchbox{flex:1;min-width:260px}
.searchbox input{
  width:100%;height:44px;padding:0 12px;border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  outline:none;
}
.controls{display:flex;gap:10px;align-items:center}
.select{
  height:44px;padding:0 12px;border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  outline:none;
}

/* Explore (layout A: left tree + right results) */
.explore{padding: 16px}
.explore-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.explore-title h1{margin:0;font-size:22px}
.explore-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.explore-layout{display:grid;grid-template-columns: 320px 1fr;gap:12px;margin-top:14px}
@media (max-width:980px){.explore-layout{grid-template-columns:1fr}}
.explore-side{display:flex;flex-direction:column;gap:12px}
.side-card{
  border:1px solid var(--border);
  border-radius:var(--r);
  background:rgba(255,255,255,.03);
  padding:12px;
}
.side-title{font-weight:900;margin-bottom:10px}
.side-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: 520px;
  overflow:auto;
  padding-right:4px;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.side-list::-webkit-scrollbar{width:0;height:0}
.side-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:rgba(255,255,255,.86);
  cursor:pointer;
}
.side-item:hover{background:rgba(255,255,255,.06)}
.side-item.is-on{border-color:rgba(37,214,255,.55);background:rgba(37,214,255,.14)}
.side-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-count{color:var(--muted);font-size:12px;flex:none}
.explore-main{min-width:0}

/* Login */
.login{max-width:520px;margin:0 auto}
.login-form .row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.login-form .btn{min-width:120px}

body[data-page="login"] .panel-head,
body[data-page="register"] .panel-head,
body[data-page="reset"] .panel-head{
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:6px;
}

body[data-page="login"] .panel-head .panel-meta,
body[data-page="register"] .panel-head .panel-meta,
body[data-page="reset"] .panel-head .panel-meta{
  font-size:13px;
}

body[data-page="me"]{
  background:#f5f6f8;
}
body[data-page="me"] .container{max-width:1120px}

.me-shell{
  display:grid;
  grid-template-columns:64px 1fr;
  gap:12px;
  align-items:start;
}

.me-nav{
  position:sticky;
  top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(15, 23, 42, .08);
}

.me-nav-btn{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(15, 23, 42, .10);
  background:#fff;
  color:rgba(15, 23, 42, .74);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.me-nav-btn svg{width:18px;height:18px}
.me-nav-btn:hover{background:rgba(99,102,241,.08); border-color:rgba(99,102,241,.25)}
.me-nav-btn:active{transform: translateY(1px)}
.me-nav-btn.is-on{
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(56,189,248,.14));
  border-color: rgba(99,102,241,.35);
  color: rgba(15, 23, 42, .92);
}

.me-main{min-width:0}
.me-grid12{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  gap:12px;
}
.me-span-12{grid-column: span 12}
.me-span-6{grid-column: span 6}

.me-card{
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:16px;
  background:#fff;
  padding:14px;
}
.me-card-title{font-weight:900;color:#0f172a}
.me-card-desc{margin-top:6px;color:rgba(15, 23, 42, .55);font-size:13px}

.me-profile{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.me-profile-avatar{
  width:44px;height:44px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;color:#0f172a;
  border:1px solid rgba(15,23,42,.08);
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(56,189,248,.14));
}
.me-profile-info{min-width:200px;flex:1}
.me-profile-name{font-weight:900;color:#0f172a}
.me-profile-sub{margin-top:4px;color:rgba(15, 23, 42, .55);font-size:13px}
.me-profile-actions{display:flex;gap:10px;flex-wrap:wrap}

.me-kv{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
.me-kv-item{
  border:1px solid rgba(15, 23, 42, .08);
  border-radius:14px;
  padding:12px;
  background: rgba(15, 23, 42, .02);
}
.me-kv-k{color:rgba(15, 23, 42, .55);font-size:12px}
.me-kv-v{margin-top:6px;font-weight:900;color:#0f172a;font-size:16px}

.me-actions{margin-top:12px}

@media (max-width: 980px){
  .me-shell{grid-template-columns:1fr}
  .me-nav{position:static; flex-direction:row; justify-content:space-between}
}
@media (max-width: 720px){
  .me-span-6{grid-column: span 12}
  .me-kv{grid-template-columns:1fr}
}

/* Auth (glassmorphism) */
body[data-page="login"], body[data-page="register"], body[data-page="reset"]{
  background:#0a0b12;
}
body[data-page="login"] .topbar,
body[data-page="register"] .topbar,
body[data-page="reset"] .topbar,
body[data-page="login"] .footer,
body[data-page="register"] .footer,
body[data-page="reset"] .footer{display:none}

.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:22px;
  position:relative;
  overflow:hidden;
}

.auth-bg{
  position:absolute;
  inset:-40vmax;
  background:
    radial-gradient(80vmax 50vmax at 20% 20%, rgba(125,77,255,.65), transparent 55%),
    radial-gradient(70vmax 45vmax at 90% 30%, rgba(0,187,255,.55), transparent 60%),
    radial-gradient(60vmax 40vmax at 50% 90%, rgba(255,80,230,.25), transparent 60%),
    linear-gradient(135deg, rgba(110,65,255,.18), rgba(0,210,255,.12));
  filter: blur(22px);
  transform: translate3d(0,0,0);
  animation: authFloat 10s ease-in-out infinite alternate;
}

@keyframes authFloat{
  from{transform: translate3d(-10px,-6px,0) scale(1)}
  to{transform: translate3d(10px,6px,0) scale(1.03)}
}

.auth-card{
  width:min(460px, 92vw);
  border-radius:22px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(20, 22, 34, .62);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding:18px;
  position:relative;
  animation: authIn .45s ease both;
}

@keyframes authIn{
  from{opacity:0; transform: translateY(10px) scale(.98)}
  to{opacity:1; transform: translateY(0) scale(1)}
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,.92);
  text-decoration:none;
  width:fit-content;
}
.auth-brand .brand-mark{
  width:32px;height:32px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  background:url("./site-icon.jpeg") center/cover no-repeat;
  border:1px solid rgba(255,255,255,.14);
  color:transparent;
}
.auth-brand .brand-text{font-weight:900}

.auth-head{margin-top:14px}
.auth-head h1{margin:0;font-size:22px;color:rgba(255,255,255,.96);letter-spacing:.2px}
.auth-sub{margin-top:6px;color:rgba(255,255,255,.62);font-size:13px}

.auth-form{margin-top:14px;display:grid;gap:12px}
.auth-field{display:grid;gap:8px}
.auth-label{font-size:12px;color:rgba(255,255,255,.70)}
.auth-field input{
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(5, 6, 10, .35);
  color:rgba(255,255,255,.92);
  padding:0 14px;
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.auth-field input::placeholder{color:rgba(255,255,255,.38)}
.auth-field input:focus{
  border-color: rgba(90, 196, 255, .7);
  box-shadow: 0 0 0 4px rgba(0, 187, 255, .15);
}

.auth-btn{
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  font-weight:800;
  cursor:pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}
.auth-btn:hover{background: rgba(255,255,255,.09)}
.auth-btn:active{transform: translateY(1px) scale(.995)}
.auth-btn.primary{
  border-color: rgba(90, 196, 255, .55);
  background: linear-gradient(135deg, rgba(125,77,255,.95), rgba(0,187,255,.95));
}
.auth-btn.primary:hover{filter: brightness(1.06)}
.auth-btn.ghost{background: rgba(0,0,0,.18)}

.auth-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:2px;
}
.auth-link{
  color: rgba(190, 224, 255, .86);
  text-decoration:none;
  font-size:13px;
}
.auth-link:hover{text-decoration:underline}

.auth-sep{
  display:flex;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,.45);
  font-size:12px;
  margin-top:2px;
}
.auth-sep::before,.auth-sep::after{
  content:"";
  height:1px;
  background: rgba(255,255,255,.12);
  flex:1;
}

.auth-social{display:grid;gap:10px}

.auth-msg{
  min-height:18px;
  color: rgba(190, 224, 255, .9);
  font-size:13px;
}

.auth-foot{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin-top:10px;
  color:rgba(255,255,255,.55);
  font-size:12px;
}
.auth-foot-link{color:rgba(255,255,255,.65);text-decoration:none}
.auth-foot-link:hover{text-decoration:underline}
.auth-dot{opacity:.6}

.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:980px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:620px){.grid{grid-template-columns:1fr}}

.card{border:1px solid var(--border);border-radius:var(--r);background:var(--card);overflow:hidden;position:relative;display:flex;flex-direction:column}
.card:hover{background:var(--card2)}
.card-inner{padding:14px;display:flex;flex-direction:column;flex:1;min-height:0}
.card-top{display:flex;gap:10px;align-items:flex-start}
.avatar{
  width:44px;height:44px;border-radius:14px;background:rgba(255,255,255,.08);
  display:grid;place-items:center;overflow:hidden;flex:none
}
.avatar img{width:100%;height:100%;object-fit:cover}
.title{font-weight:900;margin:0;line-height:1.2}
.desc{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.45;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  min-height:calc(1.45em * 2);
}
.meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;color:rgba(255,255,255,.76)}
.tag{font-size:12px;padding:4px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.04)}
.why{
  margin-top:10px;
  border-top:1px dashed rgba(255,255,255,.14);
  padding-top:10px;
  color:rgba(255,255,255,.78);
  font-size:13px;
  line-height:1.35;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  min-height:calc(1.35em * 2 + 10px);
}
.actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:auto;
  padding-top:12px;
  align-items:stretch;
}
@media (max-width:360px){.actions{grid-template-columns:1fr}}
.actions a,.actions button{
  height:38px;
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.actions .btn{border-radius:12px;padding:0 12px}

.fav{
  position:absolute;right:10px;top:10px;
  width:38px;height:38px;border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.12);
  color:rgba(255,255,255,.86);
  cursor:pointer;
}
.fav:hover{background:rgba(0,0,0,.18)}
.fav.is-on{border-color:rgba(255,215,115,.55);background:rgba(255,215,115,.18)}

.empty{margin-top:14px;padding:18px;border-radius:var(--r);border:1px dashed rgba(255,255,255,.18);color:var(--muted)}
.empty-title{font-weight:900;color:rgba(255,255,255,.86);margin-bottom:6px}

.modal{
  width:min(var(--max), calc(100vw - 28px));
  border:1px solid var(--border);
  border-radius:var(--r);
  background:rgba(11,16,32,.94);
  color:var(--text);
  box-shadow:var(--shadow);
}
.modal::backdrop{background:rgba(0,0,0,.55)}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 0}
.modal-title{font-weight:900}
.modal-body{padding:14px}

.footer{
  max-width:var(--max);
  margin:0 auto;
  padding:18px 18px 28px;
  color:var(--muted);
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
}
.footer-links{display:flex;gap:12px}
.footer-links a:hover{text-decoration:underline}

.prose{color:rgba(255,255,255,.82);line-height:1.7}
.prose h2{margin-top:18px}
.prose p,.prose li{color:rgba(255,255,255,.78)}

/* Tool detail page (new design) */
.tool-hero{display:flex;gap:16px;align-items:flex-start}
@media (max-width:720px){.tool-hero{flex-direction:column}}
.tool-avatar{
  width:72px;height:72px;border-radius:18px;
  background:rgba(255,255,255,.08);
  display:grid;place-items:center;
  overflow:hidden;flex:none;
}
.tool-avatar img{width:100%;height:100%;object-fit:cover}
.tool-main{flex:1;min-width:0}
.tool-title-row{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.tool-title{margin:0;font-size:26px;line-height:1.15}
.tool-desc{margin:10px 0 0;color:rgba(255,255,255,.78);line-height:1.55}
.tool-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.tool-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.tool-actions .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.tool-card{
  border:1px solid var(--border);
  border-radius:var(--r);
  background:rgba(255,255,255,.03);
  padding:14px;
}
.tool-card-title{font-weight:900;margin-bottom:10px}
.tool-kv{display:flex;flex-direction:column;gap:10px}
.tool-kv-row{display:flex;gap:10px;align-items:flex-start}
.tool-kv-k{width:58px;color:var(--muted);flex:none}
.tool-kv-v{color:rgba(255,255,255,.84);word-break:break-word}

.tool-extra{display:flex;flex-direction:column;gap:12px;margin-top:12px}
.tool-sections{display:flex;flex-direction:column;gap:10px}
.tool-section{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  border-radius:14px;
  padding:12px;
}
.tool-section-title{font-weight:900;margin-bottom:8px}
.tool-section-body{color:rgba(255,255,255,.82);line-height:1.7}
.tool-section-body p{margin:0 0 10px}
.tool-section-body ul,.tool-section-body ol{margin:0;padding-left:18px}
.tool-section-body li{margin:6px 0;color:rgba(255,255,255,.78)}
.tool-section-body a{text-decoration:underline}

.shot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
@media (max-width:980px){.shot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:620px){.shot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.shot{
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  aspect-ratio: 4 / 3;
  display:block;
}
.shot img{width:100%;height:100%;object-fit:cover;display:block}

.faq{display:flex;flex-direction:column;gap:10px}
.faq details{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.02);
  border-radius:14px;
  padding:12px;
}
.faq summary{cursor:pointer;font-weight:900}
.faq .faq-a{margin-top:10px;color:rgba(255,255,255,.78);line-height:1.6}

.link-list{display:flex;flex-direction:column;gap:8px}
.link-item{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(255,255,255,.02);
}
.link-item a{color:rgba(255,255,255,.9);text-decoration:underline}
.link-host{color:var(--muted);font-size:12px;white-space:nowrap}
