:root{
  --bg:#0b1020; --panel:#121a33; --panel2:#0f1730;
  --text:#e9edf7; --muted:#aab3cc; --line:#263155;
  --chip:#1b2550; --accent:#7aa2ff; --danger:#ff6b6b;
  --ok:#6bffb0;
}
*{box-sizing:border-box}
body{
  margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg, #070b18 0%, var(--bg) 100%);
  color:var(--text);
}
header{
  position:sticky; top:0; z-index:10;
  background:rgba(7,11,24,.75); backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.wrap{max-width:1200px; margin:0 auto; padding:16px 16px;}
.row{display:flex; gap:14px; align-items:center; flex-wrap:wrap;}
h1{font-size:18px; margin:0; letter-spacing:.2px;}
.pill{
  display:inline-flex; gap:8px; align-items:center;
  padding:8px 10px; border:1px solid var(--line); border-radius:999px;
  background:rgba(18,26,51,.55);
  color:var(--muted); font-size:12px;
}
.pill b{color:var(--text); font-weight:600}
.layout{
  max-width:1200px; margin:0 auto; padding:16px;
  display:grid; grid-template-columns: 320px 1fr; gap:14px;
  align-items:start;
}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr;}
}
.card{
  background:linear-gradient(180deg, rgba(18,26,51,.8) 0%, rgba(15,23,48,.8) 100%);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.8), 0 5px 15px rgba(0,0,0,.6);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.layout > .card:first-child{
  height:calc(100vh - 100px);
  max-height:calc(100vh - 100px);
}
@media (max-width: 980px){
  .layout > .card:first-child{
    height:auto;
    max-height:none;
  }
}
.card .hd{
  padding:14px 14px 12px;
  border-bottom:1px solid var(--line);
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  flex-shrink:0;
}
.card .bd{
  padding:14px;
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  overflow:hidden;
}
.layout > .card:first-child .bd > *:not(.list){
  flex-shrink:0;
}
.layout > .card:first-child .list{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding-right:8px;
  margin-right:-8px;
}
.layout > .card:first-child .list::-webkit-scrollbar{
  width:4px;
}
.layout > .card:first-child .list::-webkit-scrollbar-track{
  background:rgba(9,12,26,.3);
  border-radius:4px;
  margin-left:8px;
}
.layout > .card:first-child .list::-webkit-scrollbar-thumb{
  background:rgba(122,162,255,.3);
  border-radius:4px;
}
.layout > .card:first-child .list::-webkit-scrollbar-thumb:hover{
  background:rgba(122,162,255,.5);
}
.muted{color:var(--muted)}
input, select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(9,12,26,.6);
  color:var(--text);
  outline:none;
}
input:focus, select:focus{border-color:rgba(122,162,255,.6); box-shadow:0 0 0 3px rgba(122,162,255,.12)}
.list{
  display:flex; 
  flex-direction:column; 
  gap:8px;
}
.layout > .card:first-child .list{
  flex:1;
  min-height:0;
}
.themeItem{
  width:100%;
  padding:10px 12px 0;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(9,12,26,.35);
  color:var(--text);
  cursor:pointer;
  text-align:left;
  position:relative;
  display:flex;
  flex-direction:column;
  box-shadow: 0 4px 12px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5);
}
.themeItem:hover{border-color:rgba(122,162,255,.5)}
.themeItem.active{
  border-color:rgba(122,162,255,.85);
  background:rgba(122,162,255,.12);
}
.themeItem.edited{
  border-color:#d4af37;
  border-width:2px;
  box-shadow:0 0 0 1px rgba(212,175,55,.3);
}
.themeItem.edited.active{
  border-color:#d4af37;
  background:rgba(122,162,255,.12);
  box-shadow:0 0 0 1px rgba(212,175,55,.3);
}
.locationBadge{
  position:absolute;
  bottom:2px;
  right:14px;
  background:transparent;
  border:none;
  border-radius:6px;
  padding:4px 8px;
  font-size:20px;
  font-weight:600;
  color:rgba(170,179,204,.5);
  letter-spacing:0.5px;
  z-index:1;
}
.chips{display:flex; gap:0; flex-wrap:nowrap; margin-top:8px}
.themeItem .chips{
  margin-top:auto;
  margin-bottom:0;
  margin-left:-12px;
  margin-right:-12px;
  padding-bottom:0;
  width:calc(100% + 24px);
}
.themeItem .chips .chip{
  border-radius:0;
  border-left:none;
  border-right:none;
  border-top:1px solid var(--line);
  border-bottom:none;
  margin:0;
  flex:1;
  padding:8px 10px;
  text-align:center;
  background:rgba(27,37,80,.8);
  color:var(--muted);
}
.themeItem .chips .chip:first-child{
  border-bottom-left-radius:12px;
  border-left:1px solid var(--line);
}
.themeItem .chips .chip:last-child{
  border-bottom-right-radius:12px;
  border-right:1px solid var(--line);
}
.themeItem .chips .chip:not(:first-child){
  border-left:1px solid var(--line);
}
.themeItem .chips .chip b{
  color:var(--text);
}
.chip{
  background:rgba(27,37,80,.8);
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:var(--muted);
  display:inline-flex; gap:8px; align-items:center;
}
.chip a{color:var(--accent); text-decoration:none}
.chip a:hover{text-decoration:underline}
details{
  border:1px solid var(--line);
  background:rgba(9,12,26,.35);
  border-radius:14px;
  overflow:hidden;
}
details + details{margin-top:10px}
summary{
  padding:12px 12px;
  cursor:pointer;
  list-style:none;
  display:flex; justify-content:space-between; gap:10px; align-items:center;
}
summary::-webkit-details-marker{display:none}
.sumTitle{font-weight:650}
.sumMeta{color:var(--muted); font-size:12px}
.methodBody{padding:0 12px 12px;}
.platform{
  border:1px solid var(--line);
  background:rgba(18,26,51,.35);
  border-radius:14px;
  padding:12px;
  margin-top:10px;
}
.platform h4{margin:0 0 6px; font-size:14px}
.kv{display:grid; grid-template-columns: 180px 1fr; gap:8px; margin-top:10px}
@media (max-width: 640px){
  .kv{grid-template-columns:1fr;}
}
.k{color:var(--muted); font-size:12px}
.v{color:var(--text); font-size:13px; line-height:1.35}
ol{margin:8px 0 0 20px; padding:0}
li{margin:4px 0; color:var(--text)}
.warn{
  border:1px solid rgba(255,107,107,.35);
  background:rgba(255,107,107,.08);
  color:#ffd6d6;
  border-radius:14px;
  padding:12px;
  margin-top:10px;
}
.ok{
  border:1px solid rgba(107,255,176,.3);
  background:rgba(107,255,176,.06);
  color:#d9ffe9;
  border-radius:14px;
  padding:10px 12px;
  font-size:13px;
}
.small{font-size:12px}
.btns{display:flex; gap:8px; flex-wrap:wrap}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:12px;
  border:1px solid var(--line);
  background:rgba(9,12,26,.4);
  color:var(--text);
  cursor:pointer;
  text-decoration:none;
  font-size:12px;
}
.btn:hover{border-color:rgba(122,162,255,.5)}
.rightMeta{display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.count{color:var(--muted); font-size:12px}

