/* ==== base + encyclopedia (from guide) ==== */
  :root{
    --deepslate:#1b1d22; --slate:#24272e; --slate2:#2b2f37; --iron:#3a3f49;
    --silver:#d7dbe2; --muted:#8b919e; --xp:#6fbf3b; --glyph:#a07cf0;
    --redstone:#d6453d; --gold:#e8c14b; --diamond:#4fd0c8;
    --mono:"SF Mono",ui-monospace,"Cascadia Mono","Roboto Mono",Menlo,Consolas,monospace;
    --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  *{box-sizing:border-box}
  body{margin:0; background:var(--deepslate); color:var(--silver); font-family:var(--sans); line-height:1.55; -webkit-font-smoothing:antialiased}
  .wrap{max-width:1080px; margin:0 auto; padding:24px 20px 80px}
  header.top{display:flex; align-items:baseline; gap:14px; flex-wrap:wrap}
  h1{font-size:21px; margin:0; font-weight:800; letter-spacing:.13em; text-transform:uppercase}
  .badge{font-family:var(--mono); font-size:11px; color:var(--muted); border:1px solid var(--iron); padding:3px 8px; border-radius:4px}
  .sub{color:var(--muted); font-size:13.5px; margin:8px 0 18px; max-width:66ch}
  #search{width:100%; background:var(--slate2); color:var(--silver); border:1px solid var(--iron); border-radius:8px; padding:13px 14px; font-size:15px; font-family:var(--sans)}
  #search:focus{outline:2px solid var(--glyph); outline-offset:1px}
  nav.cats{display:flex; gap:6px; flex-wrap:wrap; margin:14px 0 22px}
  nav.cats button{font-family:var(--sans); font-size:13px; font-weight:600; background:var(--slate); color:var(--muted); border:1px solid var(--iron); padding:7px 13px; cursor:pointer; border-radius:20px}
  nav.cats button:hover{color:var(--silver)}
  nav.cats button.active{color:#12101a; background:var(--glyph); border-color:var(--glyph)}
  .count{color:var(--muted); font-size:12.5px; margin:0 0 14px}

  .cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px}
  .card{background:var(--slate); border:1px solid var(--iron); border-radius:10px; padding:14px 16px; cursor:pointer; transition:border-color .12s}
  .card:hover{border-color:var(--glyph)}
  .card .kind{font-size:10.5px; text-transform:uppercase; letter-spacing:.09em; color:var(--muted); font-weight:700}
  .card .nm{font-size:16px; font-weight:700; margin:3px 0 5px}
  .card .desc{font-size:12.5px; color:var(--muted); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
  .card.guide{border-left:3px solid var(--glyph)}
  .farmtag{margin-top:9px;display:inline-block;font-size:11px;font-weight:700;padding:3px 9px;border-radius:14px;letter-spacing:.02em}
  .farmtag.yes{color:var(--xp);border:1px solid var(--xp);background:rgba(111,191,59,.10)}
  .farmtag.no{color:var(--muted);border:1px solid var(--iron)}
  .farmline{font-size:13.5px;font-weight:600;margin:0 0 16px;padding:9px 13px;border-radius:8px}
  .farmline.yes{color:var(--xp);background:rgba(111,191,59,.10);border:1px solid rgba(111,191,59,.35)}
  .farmline.no{color:var(--muted);background:var(--slate2);border:1px solid var(--iron)}
  .farmline b{color:inherit}

  /* detail / article */
  .back{background:none; border:none; color:var(--glyph); font-size:13px; cursor:pointer; padding:0; margin-bottom:16px; font-weight:600}
  .detail h2{font-size:24px; margin:0 0 2px; font-weight:800}
  .detail .kind{font-size:11px; text-transform:uppercase; letter-spacing:.09em; color:var(--muted); font-weight:700; margin-bottom:16px}
  .detail .lead{font-size:15px; color:var(--silver); margin:0 0 18px; max-width:72ch}
  table.facts{width:100%; border-collapse:collapse; font-size:14px; margin:6px 0 18px; max-width:560px}
  table.facts td{padding:7px 12px; border-bottom:1px solid var(--iron); vertical-align:top}
  table.facts td:first-child{color:var(--muted); width:42%; font-size:12.5px; text-transform:uppercase; letter-spacing:.04em}
  table.facts td:last-child{font-family:var(--mono); font-size:13px}
  .tags{display:flex; gap:6px; flex-wrap:wrap; margin:0 0 18px}
  .tag{font-size:11px; padding:3px 9px; border-radius:14px; border:1px solid var(--iron); color:var(--muted)}

  .article{max-width:74ch}
  .article h3{font-size:17px; font-weight:700; margin:24px 0 8px; color:var(--silver)}
  .article p{font-size:14.5px; margin:0 0 12px}
  .article ul{margin:0 0 14px; padding-left:20px}
  .article li{font-size:14.5px; margin:0 0 6px}
  .article b{color:var(--silver)}
  .article .callout{background:var(--slate); border-left:3px solid var(--xp); border-radius:0 8px 8px 0; padding:12px 16px; margin:0 0 16px; font-size:13.5px; color:var(--silver)}
  .article code{font-family:var(--mono); background:var(--slate2); padding:1px 5px; border-radius:4px; font-size:13px; color:var(--diamond)}
  .empty{color:var(--muted); text-align:center; padding:48px 16px; font-size:14px}
  a.xref{color:var(--glyph); cursor:pointer; text-decoration:none; border-bottom:1px dotted var(--glyph)}
  .disc{color:var(--muted); font-size:11.5px; margin-top:40px; border-top:1px solid var(--iron); padding-top:14px}

  /* crafting recipe */
  .recipe{margin:20px 0 6px}
  .recipe h3{font-size:12px;text-transform:uppercase;letter-spacing:.11em;color:var(--muted);margin:0 0 12px;font-weight:700}
  .recipe .sl{color:var(--muted);text-transform:none;letter-spacing:0;font-weight:400;font-size:11px}
  .craft{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
  .grid3{display:grid;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(3,46px);gap:4px;background:var(--slate2);padding:6px;border-radius:10px;border:1px solid var(--iron)}
  .cell{width:46px;height:46px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#fff;background:var(--c,#3a3f49);border:1px solid rgba(0,0,0,.28);text-shadow:0 1px 2px rgba(0,0,0,.65);text-align:center;line-height:1.05;padding:2px}
  .cell.empty{background:transparent;border:1px dashed var(--iron);box-shadow:none}
  .cell.result{width:56px;height:56px;font-size:12px;border:2px solid var(--glyph);position:relative}
  .cell.result .ct{position:absolute;right:-6px;bottom:-6px;background:var(--glyph);color:#12101a;font-size:11px;font-weight:800;border-radius:10px;padding:1px 6px;border:1px solid var(--deepslate)}
  .arrowc{color:var(--muted);font-size:22px;font-weight:700}
  .smelt-src{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;color:var(--muted)}
  .legend{display:flex;flex-wrap:wrap;gap:10px 14px;margin-top:14px}
  .legend .lg{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--silver)}
  .legend .lg i{width:13px;height:13px;border-radius:3px;display:inline-block;border:1px solid rgba(0,0,0,.35);flex:0 0 auto}
  .obtained{background:var(--slate);border-left:3px solid var(--xp);border-radius:0 8px 8px 0;padding:12px 15px;font-size:14px;color:var(--silver)}

  /* hover preview card (desktop only) */
  #hovercard{position:fixed;z-index:1000;display:none;width:340px;max-width:92vw;max-height:82vh;overflow:auto;
    background:var(--slate);border:1px solid var(--iron);border-radius:12px;padding:15px 17px;
    box-shadow:0 14px 44px rgba(0,0,0,.55);pointer-events:none}
  #hovercard::-webkit-scrollbar{width:8px} #hovercard::-webkit-scrollbar-thumb{background:var(--iron);border-radius:8px}
  #hovercard h2{font-size:18px;margin:0 0 3px}
  #hovercard .kind{margin-bottom:10px}
  #hovercard .lead{font-size:13.5px;margin-bottom:12px}
  #hovercard table.facts{font-size:13px;margin-bottom:12px}
  #hovercard table.facts td{padding:5px 10px}
  #hovercard .grid3{grid-template-columns:repeat(3,40px);grid-template-rows:repeat(3,40px)}
  #hovercard .cell{width:40px;height:40px;font-size:11px}
  #hovercard .cell.result{width:48px;height:48px}
  #hovercard .recipe{margin:14px 0 2px}
  #hovercard .hint{color:var(--glyph);font-size:12px;margin-top:12px;font-weight:600}



/* ==== tools/calculators (from app) ==== */
  /* ---- Design tokens (shared with the enchant optimizer demo) ----
     Palette drawn from the anvil bench, not generic "gamer" neon. */
  :root{
    --deepslate:#1b1d22; --slate:#24272e; --slate2:#2b2f37; --iron:#3a3f49;
    --silver:#d7dbe2; --muted:#8b919e; --xp:#6fbf3b; --glyph:#a07cf0;
    --redstone:#d6453d; --gold:#e8c14b; --diamond:#4fd0c8;
    --mono:"SF Mono",ui-monospace,"Cascadia Mono","Roboto Mono",Menlo,Consolas,monospace;
    --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  }
  *{box-sizing:border-box}
  body{
    margin:0; background:var(--deepslate); color:var(--silver);
    font-family:var(--sans); line-height:1.5; -webkit-font-smoothing:antialiased;
  }
  .wrap{max-width:1060px; margin:0 auto; padding:26px 20px 72px}
  header.top{display:flex; align-items:baseline; gap:14px; flex-wrap:wrap}
  h1{font-size:22px; margin:0; font-weight:800; letter-spacing:.14em; text-transform:uppercase}
  .badge{font-family:var(--mono); font-size:11px; color:var(--muted); border:1px solid var(--iron); padding:3px 8px; border-radius:4px}
  .sub{color:var(--muted); font-size:14px; margin:8px 0 22px; max-width:64ch}

  /* tabs */
  nav.tabs{display:flex; gap:6px; flex-wrap:wrap; border-bottom:1px solid var(--iron); margin-bottom:24px}
  nav.tabs button{
    font-family:var(--sans); font-size:13px; font-weight:600; letter-spacing:.02em;
    background:none; color:var(--muted); border:none; border-bottom:2px solid transparent;
    padding:10px 14px; cursor:pointer; border-radius:6px 6px 0 0;
  }
  nav.tabs button:hover{color:var(--silver); background:var(--slate)}
  nav.tabs button.active{color:var(--silver); border-bottom-color:var(--glyph)}

  .tool{display:none}
  .tool.active{display:block}

  .grid{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:22px}
  @media (max-width:760px){.grid{grid-template-columns:1fr}}
  .panel{background:var(--slate); border:1px solid var(--iron); border-radius:10px; padding:18px}
  .panel h2{font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin:0 0 14px; font-weight:700}
  label.field{display:block; font-size:12px; color:var(--muted); margin:0 0 6px; letter-spacing:.04em}
  select,input[type=number]{
    width:100%; background:var(--slate2); color:var(--silver); border:1px solid var(--iron);
    border-radius:6px; padding:9px 10px; font-size:14px; font-family:var(--sans);
  }
  select:focus,input:focus{outline:2px solid var(--glyph); outline-offset:1px}
  .row{display:flex; gap:10px; align-items:flex-end; margin-bottom:14px}
  .row > div{flex:1}
  button.go{
    font-family:var(--sans); cursor:pointer; border-radius:6px; border:1px solid var(--iron);
    background:var(--glyph); color:#12101a; font-weight:700; padding:10px 16px; font-size:14px; width:100%;
  }
  button.go:hover{filter:brightness(1.08)}
  button.add{
    font-family:var(--sans); cursor:pointer; border-radius:6px; border:1px solid var(--iron);
    background:var(--slate2); color:var(--silver); font-weight:600; padding:9px 14px; font-size:13px; white-space:nowrap;
  }
  button.add:hover{border-color:var(--glyph)}

  .empty{color:var(--muted); font-size:14px; text-align:center; padding:26px 10px; border:1px dashed var(--iron); border-radius:8px}
  .err{color:var(--redstone); font-size:13px; min-height:18px; margin-top:8px}
  .note{color:var(--muted); font-size:12.5px; line-height:1.6; margin-top:18px; border-top:1px solid var(--iron); padding-top:14px}
  .note code{font-family:var(--mono); color:var(--silver)}
  .note b{color:var(--silver)}

  /* result totals shared */
  .totals{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px}
  .stat{flex:1; min-width:104px; background:var(--slate2); border:1px solid var(--iron); border-radius:8px; padding:12px 14px}
  .stat .k{font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em}
  .stat .v{font-size:24px; font-weight:800; margin-top:2px}
  .stat .v.xp{color:var(--xp)}
  .stat .v.gold{color:var(--gold)}
  .stat .v.di{color:var(--diamond)}

  /* enchant book list + plan */
  ul.books{list-style:none; padding:0; margin:0 0 14px}
  ul.books li{display:flex; justify-content:space-between; align-items:center; background:var(--slate2); border:1px solid var(--iron); border-radius:6px; padding:8px 12px; margin-bottom:7px; font-size:14px}
  ul.books li .nm b{color:var(--glyph)}
  ul.books li .x{background:none; border:none; color:var(--muted); font-size:18px; cursor:pointer; line-height:1; padding:0 4px}
  ul.books li .x:hover{color:var(--redstone)}
  ol.plan{list-style:none; counter-reset:s; padding:0; margin:0}
  ol.plan li{counter-increment:s; background:var(--slate2); border:1px solid var(--iron); border-radius:8px; padding:12px 14px 12px 40px; margin-bottom:9px; position:relative}
  ol.plan li::before{content:counter(s); position:absolute; left:12px; top:12px; width:20px; height:20px; border-radius:50%; background:var(--iron); color:var(--silver); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center}
  ol.plan li.tooexp{border-color:var(--redstone)}
  .op{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
  .chip{font-size:12.5px; padding:4px 9px; border-radius:5px; border:1px solid var(--iron); background:var(--slate)}
  .chip.item{border-color:var(--diamond); color:var(--diamond)}
  .chip.book{border-color:var(--glyph); color:var(--glyph)}
  .chip.result{border-color:var(--iron); color:var(--silver)}
  .arrow{color:var(--muted); font-size:13px}
  .cost{margin-left:auto; font-family:var(--mono); font-size:13px}
  .cost .lv{font-size:16px; font-weight:700; color:var(--xp)}
  .cost.bad .lv{color:var(--redstone)}
  .meta{font-size:11.5px; color:var(--muted); margin-top:6px}
  .infeasible{border:1px solid var(--redstone); border-radius:8px; padding:14px; font-size:13.5px; line-height:1.6; background:rgba(214,69,61,.08)}
  .infeasible b{color:var(--redstone)}

  /* generic result rows (beacon / xp / build / storage) */
  .res table{width:100%; border-collapse:collapse; font-size:14px; margin-top:4px}
  .res th,.res td{text-align:left; padding:8px 10px; border-bottom:1px solid var(--iron)}
  .res th{font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:600}
  .res td.num{text-align:right; font-family:var(--mono)}
  .pill{display:inline-block; font-size:12px; padding:3px 9px; border-radius:20px; border:1px solid var(--iron); margin:0 6px 6px 0; color:var(--silver)}
  .pill.on{border-color:var(--xp); color:var(--xp)}
  .pill.sec{border-color:var(--glyph); color:var(--glyph)}
  .refchips{display:flex; gap:8px; flex-wrap:wrap; margin-top:6px}
  .refchips .pill{background:var(--slate2)}

/* ============================================================
   SHELL — unified header, nav, search, palette, dashboard,
   guides, auto-farms, responsive polish. Loaded last (wins).
   ============================================================ */
html{scroll-behavior:smooth}
body{margin:0}
.container{max-width:1120px;margin:0 auto;padding:26px 22px 90px}

/* sticky header */
.site-header{position:sticky;top:0;z-index:500;background:rgba(20,22,27,.86);
  backdrop-filter:blur(10px);border-bottom:1px solid var(--iron)}
.hdr-inner{max-width:1220px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;padding:11px 20px}
.brand{font-weight:800;letter-spacing:.06em;color:var(--silver);text-decoration:none;font-size:15px;white-space:nowrap}
.brand:hover{color:#fff}
.topnav{order:3;width:100%;display:flex;flex-wrap:wrap;gap:4px}
.topnav a{color:var(--muted);text-decoration:none;font-size:13.5px;font-weight:600;padding:7px 12px;border-radius:7px;white-space:nowrap}
.topnav a:hover{color:var(--silver);background:var(--slate)}
.topnav a.active{color:#12101a;background:var(--glyph)}
.hdr-search{position:relative;display:flex;align-items:center;gap:8px;margin-left:auto}
#hdr-search{width:230px;max-width:44vw;background:var(--slate2);border:1px solid var(--iron);color:var(--silver);
  border-radius:8px;padding:8px 11px;font-size:13px;font-family:var(--sans)}
#hdr-search:focus{outline:2px solid var(--glyph);outline-offset:1px;width:280px}
.kbtn{background:var(--slate2);border:1px solid var(--iron);color:var(--muted);border-radius:7px;
  padding:7px 9px;font-size:11px;font-weight:700;cursor:pointer;font-family:var(--mono)}
.kbtn:hover{color:var(--silver);border-color:var(--glyph)}

/* search results dropdown + palette results share item styles */
.results-pop{position:absolute;top:calc(100% + 8px);right:0;width:380px;max-width:88vw;max-height:60vh;overflow:auto;
  background:var(--slate);border:1px solid var(--iron);border-radius:12px;box-shadow:0 16px 48px rgba(0,0,0,.55);
  padding:6px;display:none;z-index:600}
.results-pop.open{display:block}
.res-item{display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:8px;cursor:pointer;text-decoration:none;color:var(--silver)}
.res-item:hover,.res-item.sel{background:var(--slate2)}
.res-item .rb{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:3px 7px;border-radius:12px;
  border:1px solid var(--iron);color:var(--muted);white-space:nowrap;flex:0 0 auto}
.res-item .rb.tool{color:var(--gold);border-color:var(--gold)}
.res-item .rb.guide{color:var(--glyph);border-color:var(--glyph)}
.res-item .rb.farm{color:var(--xp);border-color:var(--xp)}
.res-item .rn{font-weight:600;font-size:14px}
.res-item .rd{color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.res-empty{padding:16px;color:var(--muted);font-size:13px;text-align:center}

/* command palette modal */
.palette{position:fixed;inset:0;z-index:800;background:rgba(0,0,0,.55);display:flex;align-items:flex-start;justify-content:center;padding-top:12vh}
.palette[hidden]{display:none}
.palette-box{width:600px;max-width:92vw;background:var(--slate);border:1px solid var(--iron);border-radius:14px;
  box-shadow:0 24px 70px rgba(0,0,0,.6);overflow:hidden}
#pal-input{width:100%;border:none;border-bottom:1px solid var(--iron);background:var(--slate2);color:var(--silver);
  padding:16px 18px;font-size:16px;font-family:var(--sans)}
#pal-input:focus{outline:none}
.pal-results{max-height:52vh;overflow:auto;padding:6px}
.pal-foot{padding:8px 14px;border-top:1px solid var(--iron);color:var(--muted);font-size:11px;font-family:var(--mono)}

/* page titles */
.page-title{font-size:26px;font-weight:800;letter-spacing:0;text-transform:none;margin:6px 0 4px}
.page-sub{color:var(--muted);font-size:14px;margin:0 0 24px;max-width:70ch}
.section-head{font-size:13px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:700;margin:30px 0 14px;border-bottom:1px solid var(--iron);padding-bottom:8px}

/* home dashboard */
.hero{background:linear-gradient(150deg,var(--slate),var(--deepslate));border:1px solid var(--iron);border-radius:16px;padding:40px 34px;margin-bottom:26px}
.hero-badge{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.04em;color:var(--xp);background:rgba(111,191,59,.12);border:1px solid rgba(111,191,59,.35);border-radius:20px;padding:5px 13px;margin-bottom:16px}
.hero h1{font-size:36px;font-weight:800;letter-spacing:.01em;margin:0 0 10px;text-transform:none;line-height:1.1}
.hero-hint{margin-top:16px;color:var(--muted);font-size:12.5px}
.hero-hint kbd{background:var(--slate2);border:1px solid var(--iron);border-bottom-width:2px;border-radius:5px;padding:1px 7px;font-family:var(--mono);font-size:11px;color:var(--silver);margin:0 1px}
.hero p{color:var(--muted);font-size:15.5px;max-width:60ch;margin:0 0 22px}
.hero-search{display:flex;gap:10px;flex-wrap:wrap}
.hero-search input{flex:1;min-width:220px;background:var(--slate2);border:1px solid var(--iron);color:var(--silver);border-radius:10px;padding:13px 15px;font-size:15px;font-family:var(--sans)}
.hero-search input:focus{outline:2px solid var(--glyph)}
.hero-search button{background:var(--glyph);color:#12101a;border:none;border-radius:10px;padding:0 20px;font-weight:700;cursor:pointer;font-size:14px}
.statgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:26px}
.statcard{background:var(--slate);border:1px solid var(--iron);border-radius:12px;padding:16px 18px}
.statcard .n{font-size:28px;font-weight:800;color:var(--diamond)}
.statcard .l{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-top:2px}
.tilegrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.tile{display:block;background:var(--slate);border:1px solid var(--iron);border-radius:12px;padding:18px;text-decoration:none;color:var(--silver);transition:border-color .12s,transform .12s}
.tile:hover{border-color:var(--glyph);transform:translateY(-2px)}
.tile .t{font-size:16px;font-weight:700;margin-bottom:5px}
.tile .d{font-size:13px;color:var(--muted);line-height:1.5}
.quicklinks{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.quicklinks a{background:var(--slate2);border:1px solid var(--iron);border-radius:20px;padding:8px 16px;color:var(--silver);text-decoration:none;font-size:13.5px;font-weight:600}
.quicklinks a:hover{border-color:var(--glyph);color:#fff}

/* tools tab nav (reuse) */
#view-tools .tabs{margin-bottom:22px}

/* guides */
.guide-group{margin-bottom:26px}
.article-wrap{max-width:76ch}
.article-wrap .back{margin-bottom:18px}

/* auto farms */
.af-controls{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.af-controls input,.af-controls select{background:var(--slate2);border:1px solid var(--iron);color:var(--silver);border-radius:8px;padding:9px 11px;font-size:13.5px;font-family:var(--sans)}
.af-controls input{flex:1;min-width:200px}
.af-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.af-card{cursor:pointer}
.af-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.af-head .nm{font-size:15px;font-weight:700}
.af-meta{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.af-note{font-size:13px;color:var(--silver);margin-bottom:8px}
.af-compat{font-size:12px;color:var(--muted);font-family:var(--mono)}
.diff-easy{color:var(--xp);border-color:var(--xp)!important}
.diff-medium{color:var(--gold);border-color:var(--gold)!important}
.diff-hard{color:var(--redstone);border-color:var(--redstone)!important}

/* about */
.about-card{background:var(--slate);border:1px solid var(--iron);border-radius:12px;padding:22px 24px;max-width:74ch;font-size:14.5px;line-height:1.7}
.about-card h3{margin:18px 0 8px;font-size:15px}
.about-card a{color:var(--glyph)}

/* view toggling */
.view{display:none}
.view.active{display:block}

/* responsive */
@media (max-width:720px){
  .hdr-inner{flex-wrap:wrap;gap:10px}
  .topnav{order:3;width:100%}
  .hdr-search{order:2;margin-left:auto;flex-wrap:wrap}
  #hdr-search{flex:1;min-width:140px}
  #hdr-search:focus{width:auto}
  .hero{padding:28px 20px}
  .hero h1{font-size:26px}
  .page-title{font-size:22px}
}

/* ============================================================
   EXTENSION STYLES — Pins, Checklists, Villagers
   ============================================================ */

/* --- shared page headings for new sections --- */
.page-title{ font-size:1.7rem; margin:0; }
.page-sub{ color:var(--muted); margin:.35rem 0 1.1rem; max-width:60ch; }
.page-sub a{ color:var(--diamond); }
.detail-top{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.6rem; }
.detail-top .page-title{ margin:0; }

/* --- pin buttons on cards / details --- */
.card{ position:relative; }
.pinbtn{ position:absolute; top:.45rem; right:.45rem; z-index:3; display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; padding:0; border-radius:7px; cursor:pointer;
  background:rgba(20,22,27,.55); border:1px solid var(--iron); color:var(--muted); transition:.15s; }
.pinbtn svg{ fill:none; stroke:currentColor; stroke-width:1.5; }
.pinbtn:hover{ color:var(--gold); border-color:var(--gold); background:var(--slate2); }
.pinbtn.on{ color:var(--gold); border-color:var(--gold); background:rgba(232,193,75,.14); }
.pinbtn.on svg{ fill:currentColor; stroke:currentColor; }
.detail-top .pinbtn{ position:static; width:32px; height:32px; }
.tool-pin{ display:flex; justify-content:flex-end; margin:-.2rem 0 .4rem; }
.tool-pin .pinbtn{ position:static; }

/* --- header pin toggle + badge --- */
.kbtn.pinhdr{ position:relative; display:inline-flex; align-items:center; gap:0; padding:.32rem .5rem; }
.kbtn.pinhdr svg{ fill:currentColor; }
#pin-count{ position:absolute; top:-6px; right:-6px; min-width:16px; height:16px; padding:0 4px;
  display:none; align-items:center; justify-content:center; font-size:.66rem; font-weight:700;
  color:#1b1d22; background:var(--gold); border-radius:9px; font-family:var(--mono); }

/* --- pinned drawer --- */
#pindrawer-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.45); opacity:0; pointer-events:none; transition:.2s; z-index:60; }
#pindrawer-overlay.open{ opacity:1; pointer-events:auto; }
#pindrawer{ position:fixed; top:0; right:0; height:100%; width:340px; max-width:88vw; z-index:61;
  background:var(--slate); border-left:1px solid var(--iron); transform:translateX(102%); transition:transform .22s ease;
  display:flex; flex-direction:column; box-shadow:-12px 0 40px rgba(0,0,0,.4); }
#pindrawer.open{ transform:translateX(0); }
.pindrawer-head{ display:flex; align-items:center; justify-content:space-between; padding:1rem 1.1rem;
  border-bottom:1px solid var(--iron); font-weight:700; }
#pindrawer-close{ background:none; border:none; color:var(--muted); font-size:1.1rem; cursor:pointer; }
#pindrawer-close:hover{ color:var(--silver); }
#pindrawer-body{ overflow-y:auto; padding:.6rem .8rem 1.4rem; }
.pin-empty{ color:var(--muted); font-size:.9rem; line-height:1.5; padding:1.2rem .4rem; }
.pin-group{ margin-top:.9rem; }
.pin-group-h{ font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:.2rem .2rem .4rem; }
.pin-row{ display:flex; align-items:center; gap:.4rem; margin-bottom:.35rem; }
.pin-link{ flex:1; display:flex; align-items:center; gap:.5rem; padding:.5rem .6rem; border-radius:8px;
  background:var(--slate2); border:1px solid var(--iron); text-decoration:none; color:var(--silver); min-width:0; }
.pin-link:hover{ border-color:var(--glyph); }
.pin-link .rb{ font-size:.62rem; text-transform:uppercase; letter-spacing:.04em; color:#1b1d22; background:var(--glyph);
  padding:.1rem .35rem; border-radius:5px; font-weight:700; flex:none; }
.pin-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.86rem; }
.pin-remove{ flex:none; width:28px; height:28px; border-radius:7px; background:var(--slate2); border:1px solid var(--iron);
  color:var(--muted); cursor:pointer; }
.pin-remove:hover{ color:var(--redstone); border-color:var(--redstone); }

/* --- checklists --- */
.cltabs{ display:flex; flex-wrap:wrap; gap:.4rem; margin:.2rem 0 1rem; }
.cltab{ padding:.4rem .7rem; border-radius:8px; background:var(--slate2); border:1px solid var(--iron);
  color:var(--muted); cursor:pointer; font-size:.85rem; }
.cltab:hover{ color:var(--silver); }
.cltab.active{ color:var(--silver); border-color:var(--xp); background:rgba(111,191,59,.12); }
.cl-progresshead{ background:var(--slate2); border:1px solid var(--iron); border-radius:10px; padding:.85rem 1rem; margin-bottom:.9rem; }
.clp-title{ font-weight:700; }
.clp-stat{ color:var(--muted); font-size:.85rem; margin:.15rem 0 .55rem; font-family:var(--mono); }
.clp-bar{ height:9px; background:var(--deepslate); border-radius:6px; overflow:hidden; }
.clp-bar span{ display:block; height:100%; width:0; background:linear-gradient(90deg,var(--xp),var(--diamond)); transition:width .3s; }
.cl-controls{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.cl-controls input,.cl-controls select{ padding:.5rem .6rem; border-radius:8px; background:var(--slate2);
  border:1px solid var(--iron); color:var(--silver); font-size:.85rem; }
.cl-controls input{ flex:1; min-width:180px; }
.cl-reset{ background:var(--slate2); border:1px solid var(--iron); color:var(--muted); border-radius:8px; padding:.5rem .7rem; cursor:pointer; font-size:.82rem; }
.cl-reset:hover{ color:var(--silver); }
.cl-reset.danger{ border-color:rgba(214,69,61,.5); color:var(--redstone); }
.cl-reset.danger:hover{ background:rgba(214,69,61,.14); }
.cl-card{ display:flex; gap:.7rem; align-items:flex-start; cursor:pointer; padding:.75rem .85rem; }
.cl-card .cl-check{ flex:none; width:24px; height:24px; border-radius:6px; border:2px solid var(--iron);
  display:flex; align-items:center; justify-content:center; color:transparent; font-weight:700; margin-top:.1rem; transition:.15s; }
.cl-card:hover .cl-check{ border-color:var(--xp); }
.cl-card.done{ border-color:var(--xp); background:rgba(111,191,59,.08); opacity:.9; }
.cl-card.done .cl-check{ background:var(--xp); border-color:var(--xp); color:#12210a; }
.cl-card.done .nm{ text-decoration:line-through; color:var(--muted); }
.cl-body{ min-width:0; }
.cl-body .nm{ font-weight:600; }
.cl-body .desc{ color:var(--muted); font-size:.82rem; margin-top:.15rem; }
.cl-meta{ font-size:.75rem; color:var(--muted); margin-top:.4rem; }
.cl-ref{ color:var(--diamond); text-decoration:none; }
.cl-ref:hover{ text-decoration:underline; }

/* --- villagers --- */
.vl-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:.8rem; }
.vl-card{ cursor:pointer; padding:.9rem; padding-right:2.4rem; }
.vl-card:hover{ border-color:var(--glyph); }
.vl-name{ font-weight:700; font-size:1.05rem; }
.vl-station{ color:var(--gold); font-size:.8rem; margin:.1rem 0 .4rem; }
.vl-card .desc{ color:var(--muted); font-size:.83rem; line-height:1.45; }
.vl-uses{ display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.55rem; }
.vl-stage{ font-size:.72rem; color:var(--muted); margin-top:.5rem; text-transform:uppercase; letter-spacing:.04em; }
.vd-facts{ display:flex; flex-wrap:wrap; gap:.4rem; margin:.6rem 0 1rem; }
.pill.station a{ color:inherit; text-decoration:none; }
.pill.station a:hover{ text-decoration:underline; }
.vd-block{ margin:1.1rem 0; }
.vd-block h3{ font-size:.95rem; margin:0 0 .5rem; color:var(--silver); }
.vd-list{ margin:0; padding-left:1.1rem; color:var(--silver); }
.vd-list li{ margin:.2rem 0; }
.vd-list.good li::marker{ color:var(--xp); }
.vd-list.bad li::marker{ color:var(--redstone); }
.ench-chips{ display:flex; flex-wrap:wrap; gap:.35rem; }
table.trades{ width:100%; border-collapse:collapse; font-size:.83rem; background:var(--slate2);
  border:1px solid var(--iron); border-radius:10px; overflow:hidden; }
table.trades th{ text-align:left; background:var(--deepslate); color:var(--muted); font-weight:600;
  padding:.55rem .6rem; font-size:.74rem; text-transform:uppercase; letter-spacing:.03em; }
table.trades td{ padding:.5rem .6rem; border-top:1px solid var(--iron); vertical-align:top; }
table.trades td.lv{ font-weight:700; color:var(--gold); white-space:nowrap; background:rgba(232,193,75,.05); }
table.trades td.tn{ color:var(--muted); }

@media (max-width:640px){
  #pindrawer{ width:100%; max-width:100vw; }
  table.trades{ display:block; overflow-x:auto; white-space:nowrap; }
}

/* ============================================================
   FEATURE STYLES — Projects, World Profiles, Coordinates, Feedback
   ============================================================ */
.btn-primary,.btn-ghost{ border-radius:8px; padding:.5rem .8rem; cursor:pointer; font-size:.85rem; font-family:var(--sans); border:1px solid var(--iron); }
.btn-primary{ background:var(--xp); color:#12210a; border-color:var(--xp); font-weight:700; }
.btn-primary:hover{ filter:brightness(1.08); }
.btn-ghost{ background:var(--slate2); color:var(--silver); }
.btn-ghost:hover{ border-color:var(--glyph); }
.dt-actions{ display:flex; align-items:center; gap:.4rem; }
.danger-text{ background:none;border:1px solid var(--iron);border-radius:7px;color:var(--muted);cursor:pointer;padding:.3rem .5rem;font-size:.8rem; }
.danger-text:hover{ color:var(--redstone); border-color:var(--redstone); }

/* report button */
.reportbtn{ display:inline-flex; align-items:center; gap:.25rem; background:var(--slate2); border:1px solid var(--iron); color:var(--muted);
  border-radius:8px; padding:.34rem .6rem; font-size:.78rem; cursor:pointer; font-family:var(--sans); }
.reportbtn:hover{ color:var(--gold); border-color:var(--gold); }

/* header world chip */
.kbtn.worldchip{ display:inline-flex; align-items:center; gap:.35rem; max-width:170px; }
.kbtn.worldchip #world-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.8rem; }
.wc-ico{ font-size:.85rem; }

/* projects */
.proj-new,.proj-add{ padding:.9rem; margin-bottom:1.1rem; }
.pn-row{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.5rem; }
.pn-row input[type=text]{ flex:1; min-width:160px; }
.pn-row input[type=number]{ width:110px; }
.proj-new input,.proj-new select,.proj-new textarea,.proj-add input,.proj-add select,.proj-add textarea,
.world-new input,.world-new select,.coord-new input,.coord-new select,.conv input,.world-notes,.bk-box,
.fb-body input,.fb-body select,.fb-body textarea{ padding:.5rem .6rem; border-radius:8px; background:var(--slate2); border:1px solid var(--iron); color:var(--silver); font-size:.85rem; font-family:var(--sans); }
.proj-new textarea,.proj-add textarea{ width:100%; resize:vertical; }
.pn-hint{ font-size:.76rem; color:var(--muted); margin-top:.5rem; }
.soon{ color:var(--gold); border:1px dashed rgba(232,193,75,.5); border-radius:5px; padding:0 .3rem; font-size:.72rem; }
.proj-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:.8rem; }
.proj-card{ cursor:pointer; padding:.85rem; padding-right:2.4rem; }
.proj-card:hover{ border-color:var(--glyph); }
.pc-type{ font-size:.7rem; text-transform:uppercase; letter-spacing:.04em; color:var(--glyph); }
.proj-card .nm{ font-weight:700; margin:.15rem 0 .5rem; }
.pc-stat{ font-size:.76rem; color:var(--muted); margin-top:.4rem; font-family:var(--mono); }
.proj-add{ margin-top:1rem; }
.proj-add textarea{ width:100%; margin:.5rem 0; resize:vertical; }
.mat-table{ width:100%; border-collapse:collapse; font-size:.85rem; background:var(--slate2); border:1px solid var(--iron); border-radius:10px; overflow:hidden; margin:.4rem 0 1rem; }
.mat-table th{ text-align:left; background:var(--deepslate); color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.03em; padding:.5rem .6rem; }
.mat-table td{ padding:.35rem .6rem; border-top:1px solid var(--iron); }
.mat-table td.mn{ font-weight:600; }
.mat-table input.mq{ width:80px; padding:.3rem .4rem; border-radius:6px; background:var(--deepslate); border:1px solid var(--iron); color:var(--silver); }
.mat-table tr.done{ background:rgba(111,191,59,.10); }
.mat-table tr.done td.mn{ color:var(--xp); }
.mtick{ color:var(--xp); margin-right:.35rem; font-weight:700; }
.mdel{ background:none; border:none; color:var(--muted); cursor:pointer; }
.mdel:hover{ color:var(--redstone); }
.proj-notes-l{ display:block; font-size:.8rem; color:var(--muted); margin:.4rem 0; }
.proj-notes-l textarea{ width:100%; margin-top:.3rem; resize:vertical; }
.proj-foot{ margin-top:1rem; }

/* world profiles */
.world-list{ display:flex; flex-direction:column; gap:.4rem; margin-bottom:.8rem; }
.world-row{ display:flex; gap:.4rem; align-items:stretch; }
.world-row .world-pick{ flex:1; display:flex; align-items:center; justify-content:space-between; gap:.6rem; text-align:left;
  padding:.6rem .8rem; border-radius:8px; background:var(--slate2); border:1px solid var(--iron); color:var(--silver); cursor:pointer; }
.world-row.active .world-pick{ border-color:var(--xp); background:rgba(111,191,59,.12); }
.world-row .world-pick:hover{ border-color:var(--glyph); }
.wtype{ font-size:.7rem; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.world-row [data-wrename]{ background:var(--slate2); border:1px solid var(--iron); border-radius:7px; color:var(--muted); cursor:pointer; padding:0 .6rem; }
.world-row [data-wrename]:hover{ color:var(--silver); }
.world-new{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.5rem; }
.world-new input{ flex:1; min-width:160px; }

/* coordinates */
.coord-new{ padding:.9rem; margin-bottom:1rem; }
.cn-grid{ display:grid; grid-template-columns:2fr 1fr 1fr 1fr 1.3fr 1.3fr; gap:.5rem; margin-bottom:.5rem; }
.coord-new #cn-notes{ width:100%; margin-bottom:.5rem; }
.coord-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:.7rem; }
.coord-card{ padding:.8rem; }
.coord-card.pinned{ border-color:var(--gold); }
.cc-head{ display:flex; align-items:center; flex-wrap:wrap; gap:.35rem; margin-bottom:.4rem; }
.cc-name{ font-weight:700; margin-right:.2rem; }
.cc-xyz{ font-family:var(--mono); font-size:.9rem; color:var(--silver); }
.cc-xyz b{ color:var(--diamond); }
.cc-notes{ font-size:.8rem; color:var(--muted); margin-top:.35rem; }
.cc-actions{ display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.55rem; }
.cc-actions button{ background:var(--slate2); border:1px solid var(--iron); border-radius:7px; color:var(--muted); cursor:pointer; padding:.3rem .5rem; font-size:.76rem; }
.cc-actions button:hover{ color:var(--silver); border-color:var(--glyph); }
.cc-actions .danger-text:hover{ color:var(--redstone); border-color:var(--redstone); }
.pill.dim-overworld{ color:var(--xp); } .pill.dim-nether{ color:var(--redstone); } .pill.dim-end{ color:var(--glyph); }

/* converter + notes + backup */
.conv{ padding:.9rem; }
.conv-row{ display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.conv-row input{ width:120px; }
.conv-out{ margin-top:.6rem; font-family:var(--mono); font-size:.9rem; color:var(--diamond); }
.world-notes,.bk-box{ width:100%; resize:vertical; margin-bottom:.5rem; }
.backup-row{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:.5rem; }

/* feedback modal */
#fb-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:none; align-items:center; justify-content:center; z-index:70; padding:1rem; }
#fb-overlay.open{ display:flex; }
#fb-modal{ width:520px; max-width:100%; max-height:90vh; overflow-y:auto; background:var(--slate); border:1px solid var(--iron); border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.fb-head{ display:flex; align-items:center; justify-content:space-between; padding:1rem 1.1rem; border-bottom:1px solid var(--iron); font-weight:700; }
#fb-close{ background:none; border:none; color:var(--muted); font-size:1.1rem; cursor:pointer; }
#fb-close:hover{ color:var(--silver); }
.fb-body{ padding:1rem 1.1rem; display:flex; flex-direction:column; gap:.7rem; }
.fb-body label{ display:flex; flex-direction:column; gap:.3rem; font-size:.78rem; color:var(--muted); }
.fb-body input,.fb-body select,.fb-body textarea{ width:100%; resize:vertical; }
.fb-actions{ display:flex; gap:.5rem; margin-top:.2rem; }
.fb-status{ font-size:.8rem; color:var(--xp); min-height:1rem; }
.fb-page-card p{ margin:.3rem 0 .7rem; }

@media (max-width:640px){
  .cn-grid{ grid-template-columns:1fr 1fr 1fr; }
  .cn-grid .cn-nm{ grid-column:1 / -1; }
  #fb-modal{ border-radius:12px; }
}

/* ---- per-farm guide panel (entry page) ---- */
.farm-guide{ margin-top:18px; background:var(--slate2); border:1px solid var(--iron); border-left:3px solid var(--xp); border-radius:12px; padding:1rem 1.15rem 1.15rem; }
.fg-head{ display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-bottom:.3rem; }
.fg-head h3{ margin:0; font-size:1.05rem; flex:1 1 auto; }
.fg-plat{ color:var(--muted); font-size:.78rem; font-family:var(--mono); margin:.1rem 0 .6rem; }
.farm-guide h4{ margin:1rem 0 .35rem; font-size:.82rem; text-transform:uppercase; letter-spacing:.05em; color:var(--glyph); }
.fg-list,.fg-steps{ margin:0; padding-left:1.2rem; color:var(--silver); }
.fg-list li,.fg-steps li{ margin:.28rem 0; line-height:1.5; }
.fg-steps li{ padding-left:.2rem; }
.fg-steps li::marker{ color:var(--xp); font-weight:700; }
.fg-list li::marker{ color:var(--muted); }
.farm-guide .note{ margin-top:.9rem; }

/* ---- farm guide v2: diagram + sections ---- */
.fg-where{ color:var(--muted); font-size:.85rem; margin:.2rem 0 .7rem; line-height:1.5; }
.fg-where b{ color:var(--silver); }
.fg-diagram{ background:rgba(0,0,0,.18); border:1px solid var(--iron); border-radius:10px; padding:.6rem; margin:.2rem 0 1rem; text-align:center; }
.fg-diagram svg{ width:100%; height:auto; max-width:440px; }
.fg-diagram text{ font-family:var(--sans); }
.fg-diagram .d{ fill:var(--muted); font-size:9px; }
.fg-diagram .w{ fill:var(--diamond); font-size:9px; }
.fg-diagram .g{ fill:var(--xp); font-size:9px; font-weight:700; }
.fg-diagram .l{ fill:var(--redstone); font-size:9px; }
.fg-needs{ columns:2; column-gap:1.4rem; }
.fg-needs li{ break-inside:avoid; }
.fg-bad li::marker{ color:var(--redstone); }
@media (max-width:560px){ .fg-needs{ columns:1; } }

/* ============================================================
   ENDERMAN THEME + HOME OVERHAUL  (final :root override wins)
   ============================================================ */
:root{
  --deepslate:#0e0d12; --slate:#16151d; --slate2:#1c1b25; --iron:#302d3e;
  --silver:#e3e1ea; --muted:#8d8a9c; --xp:#6fbf3b; --glyph:#b28bff;
  --redstone:#e0574c; --gold:#e8c14b; --diamond:#4fd0c8; --ender:#cdb2ff;
}
body{ background:radial-gradient(140% 100% at 50% 0%, #14121c 0%, var(--deepslate) 58%); background-attachment:fixed; }
.site-header{ background:rgba(14,13,18,.82); }

/* hero */
.home-hero{ position:relative; overflow:hidden; border:1px solid var(--iron); border-radius:22px; padding:58px 34px 52px; margin-top:6px;
  background:radial-gradient(120% 150% at 50% -20%, rgba(178,139,255,.18), transparent 55%), linear-gradient(180deg,#15131d,#100f16); }
.ender-particles{ position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.ender-p{ position:absolute; bottom:-6px; background:var(--ender); border-radius:1px; box-shadow:0 0 6px var(--glyph); opacity:0; animation:enderDrift linear infinite; }
@keyframes enderDrift{ 0%{transform:translateY(10px) scale(.8);opacity:0} 12%{opacity:.85} 80%{opacity:.4} 100%{transform:translateY(-130px) scale(1);opacity:0} }
.ender-figure{ position:absolute; right:6%; bottom:-14px; height:300px; opacity:.55; pointer-events:none; }
.ender-figure .body rect{ fill:#080810; stroke:rgba(178,139,255,.16); stroke-width:1; }
.ender-figure .eye{ fill:var(--ender); filter:drop-shadow(0 0 5px var(--glyph)); animation:enderEyes 4.5s ease-in-out infinite; }
@keyframes enderEyes{ 0%,100%{opacity:.9} 44%{opacity:.5} 50%{opacity:1} 56%{opacity:.6} }
.hero-content{ position:relative; max-width:660px; z-index:1; }
.hero-badge{ display:inline-block; font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--ender);
  background:rgba(178,139,255,.1); border:1px solid rgba(178,139,255,.28); border-radius:20px; padding:5px 13px; margin:0; }
.hero-title{ font-size:clamp(36px,6.2vw,58px); font-weight:800; letter-spacing:-.015em; line-height:1.02; margin:16px 0 12px; color:var(--silver); text-transform:none; }
.hero-title span{ color:var(--glyph); text-shadow:0 0 26px rgba(178,139,255,.5); }
.hero-tag{ color:var(--muted); font-size:16px; line-height:1.65; max-width:58ch; margin:0 0 26px; }
.hero-search2{ display:flex; align-items:center; gap:6px; max-width:560px; background:var(--slate2); border:1px solid var(--iron); border-radius:13px; padding:5px 6px 5px 14px; transition:.16s; }
.hero-search2:focus-within{ border-color:var(--glyph); box-shadow:0 0 0 3px rgba(178,139,255,.16); }
.hero-search2 .hs-ico{ width:18px; height:18px; color:var(--muted); flex:none; }
.hero-search2 input{ flex:1; min-width:0; background:none; border:none; outline:none; color:var(--silver); font-size:15px; padding:12px 8px; font-family:var(--sans); }
.hero-search2 input::placeholder{ color:var(--muted); }
.hero-search2 button{ flex:none; background:var(--glyph); color:#150f22; border:none; border-radius:9px; padding:11px 20px; font-weight:800; font-size:14px; cursor:pointer; transition:.14s; }
.hero-search2 button:hover{ filter:brightness(1.1); box-shadow:0 0 20px rgba(178,139,255,.4); }
.hero-hint{ margin-top:15px; color:var(--muted); font-size:12.5px; }

/* section cards */
.home-sections{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; margin-top:30px; }
.home-sec{ display:flex; gap:14px; align-items:flex-start; padding:18px; border:1px solid var(--iron); border-radius:15px; background:var(--slate2); text-decoration:none; transition:.16s; }
.home-sec:hover{ border-color:rgba(178,139,255,.55); background:var(--slate); transform:translateY(-2px); box-shadow:0 12px 30px rgba(0,0,0,.4), 0 0 0 1px rgba(178,139,255,.15); }
.home-sec .ic{ flex:none; width:44px; height:44px; border-radius:12px; display:grid; place-items:center; color:var(--glyph); background:rgba(178,139,255,.1); border:1px solid rgba(178,139,255,.24); }
.home-sec .ic svg{ width:22px; height:22px; }
.home-sec .tx{ display:flex; flex-direction:column; min-width:0; }
.home-sec .tx .t{ font-weight:700; color:var(--silver); font-size:15.5px; }
.home-sec .tx .d{ color:var(--muted); font-size:12.8px; margin-top:4px; line-height:1.5; }
.home-foot{ text-align:center; color:var(--muted); font-size:12px; margin:36px 0 10px; letter-spacing:.02em; }

@media (max-width:560px){ .home-hero{ padding:40px 22px 36px; } .ender-figure{ opacity:.3; height:220px; right:-8%; } }

/* ============================================================
   GLOBAL ANIMATED BACKGROUND (all pages)
   ============================================================ */
#bg-fx{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
main{ position:relative; z-index:1; }              /* content sits above the background */
.site-header{ z-index:500; }

.bg-particles{ position:absolute; inset:0; }
.bg-p{ position:absolute; bottom:-10px; background:var(--ender); border-radius:1px; box-shadow:0 0 6px var(--glyph); opacity:0; animation:bgDrift linear infinite; }
@keyframes bgDrift{ 0%{transform:translateY(0) scale(.7);opacity:0} 10%{opacity:.5} 85%{opacity:.22} 100%{transform:translateY(-104vh) scale(1);opacity:0} }

/* wandering enderman */
#bg-ender{ position:fixed; bottom:0; left:20%; height:min(48vh,400px); aspect-ratio:100/340; opacity:.5; transition:opacity .45s ease; will-change:left,opacity; }
#bg-ender.tp{ opacity:0; }
#ender-svg{ width:100%; height:100%; overflow:visible; animation:enBob 2.7s ease-in-out infinite; }
.en-body rect,.en-limb rect{ fill:#1a1728; }
.en-eyes rect{ fill:#e0ccff; opacity:.9; filter:drop-shadow(0 0 4px var(--glyph)); animation:enEyes 5s ease-in-out infinite; }
.en-limb{ transform-box:fill-box; transform-origin:50% 0; }
.en-larm{ animation:enSwingA 2.7s ease-in-out infinite; }
.en-rarm{ animation:enSwingB 2.7s ease-in-out infinite; }
.en-lleg{ animation:enSwingB 2.7s ease-in-out infinite; }
.en-rleg{ animation:enSwingA 2.7s ease-in-out infinite; }
@keyframes enSwingA{ 0%,100%{transform:rotate(5deg)} 50%{transform:rotate(-5deg)} }
@keyframes enSwingB{ 0%,100%{transform:rotate(-5deg)} 50%{transform:rotate(5deg)} }
@keyframes enBob{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
@keyframes enEyes{ 0%,100%{opacity:.85} 46%{opacity:.4} 52%{opacity:1} }
@media (prefers-reduced-motion:reduce){ .bg-p,#ender-svg,.en-limb,.en-eyes rect{ animation:none } #bg-ender{ opacity:.32 } }
