:root {
  --bg: #121014; --panel: #1c191f; --line: #2e2a33; --text: #ece6dc; --muted: #a59d93;
  --accent: #e8b25a; --good: #7fcf8a; --bad: #ef7a6d;
  --weapon: #d9963f; --vitality: #6cbf5a; --spirit: #b07ee0;
  --S: #ff7a5c; --A: #f2b544; --B: #d9d36a; --C: #8fbf8a; --D: #8a96a8;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Noto Sans Thai Looped", system-ui, sans-serif; }
a { color: inherit; }
h1, h2, h3, .logo { font-family: "Kanit", "Noto Sans Thai Looped", sans-serif; font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.9rem; margin: 1.2rem 0 .3rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1rem; font-weight: 500; color: var(--muted); margin: 1rem 0 .4rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--line); background: #0d0b0e; position: sticky; top: 0; z-index: 5; }
.row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; min-height: 56px; }
.logo { text-decoration: none; font-size: 1.25rem; }
.logo span { color: var(--accent); }
nav { display: flex; gap: .25rem; flex-wrap: wrap; }
nav a { text-decoration: none; padding: .35rem .7rem; border-radius: 6px; color: var(--muted); }
nav a.on, nav a:hover { color: var(--text); background: var(--panel); }
.lead { color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); font-size: .9rem; }
.tier { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; margin: .75rem 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.tlabel { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-radius: 8px; padding: .5rem; color: #1a1410; }
.tlabel b { font: 600 2rem "Kanit", sans-serif; }
.tlabel small { font-size: .75rem; line-height: 1.3; }
.t-S { background: var(--S); } .t-A { background: var(--A); } .t-B { background: var(--B); } .t-C { background: var(--C); } .t-D { background: var(--D); }
.tgrid { display: flex; flex-wrap: wrap; gap: .5rem; }
.hcard { width: 88px; text-decoration: none; text-align: center; font-size: .8rem; }
.hcard img { width: 88px; height: 117px; object-fit: cover; border-radius: 6px; display: block; background: #000; }
.hname { display: block; margin-top: .2rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hstat { color: var(--muted); }
.hcard:hover img { outline: 2px solid var(--accent); }
.badge { display: inline-block; padding: 0 .5rem; border-radius: 5px; color: #1a1410; font-weight: 600; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .85rem; background: var(--panel); }
.hrow { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; }
.hrow img, .mlist img { border-radius: 50%; background: #000; }
.hhead { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1rem; flex-wrap: wrap; }
.hhead > img { border-radius: 10px; object-fit: cover; background: #000; }
.hhead h1 { margin-top: 0; }
.stats { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .8rem; min-width: 96px; }
.stats b { display: block; font: 600 1.2rem "Kanit", sans-serif; }
.stats small { color: var(--muted); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.item { display: flex; gap: .6rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: .4rem .6rem; }
.item img { border-radius: 6px; background: #000; flex: none; }
.iname { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.isub { color: var(--muted); font-size: .78rem; }
.slot-weapon { border-left-color: var(--weapon); } .slot-vitality { border-left-color: var(--vitality); } .slot-spirit { border-left-color: var(--spirit); }
.slot-weapon-text { color: var(--weapon); } .slot-vitality-text { color: var(--vitality); } .slot-spirit-text { color: var(--spirit); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.mlist { list-style: none; padding: 0; margin: 0; }
.mlist li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.mlist a { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; }
.good { color: var(--good); font-size: .9rem; } .bad { color: var(--bad); font-size: .9rem; }
.foot { margin-top: 3rem; padding-top: 1rem; padding-bottom: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
@media (max-width: 640px) {
  .tier { grid-template-columns: 1fr; }
  .tlabel { flex-direction: row; gap: .6rem; justify-content: flex-start; }
  .tlabel b { font-size: 1.5rem; }
  .two { grid-template-columns: 1fr; }
  .hcard, .hcard img { width: 76px; } .hcard img { height: 101px; }
  h1 { font-size: 1.5rem; }
}
.build { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin: .6rem 0; }
.build summary { cursor: pointer; position: relative; padding: .7rem .9rem .7rem 1.9rem; display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: baseline; list-style: none; }
.build summary::-webkit-details-marker { display: none; }
.build summary::before { content: "▸"; color: var(--muted); position: absolute; left: .9rem; top: .7rem; }
.build[open] summary::before { content: "▾"; }
.btitle { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.bmeta { color: var(--muted); font-size: .85rem; }
.bbadge { font-size: .75rem; padding: 0 .45rem; border-radius: 5px; background: var(--line); color: var(--muted); }
.bbody { padding: 0 .9rem .9rem; }
.bnote { white-space: pre-line; }
.bcat h4 { margin: .8rem 0 .3rem; font: 500 .95rem "Kanit", sans-serif; }
.icons { display: flex; flex-wrap: wrap; gap: .45rem; }
.icon { width: 64px; text-align: center; border-bottom: 3px solid var(--line); padding-bottom: .2rem; }
.icon img { border-radius: 6px; background: #000; display: block; margin: 0 auto; }
.icon small { display: block; font-size: .68rem; line-height: 1.2; margin-top: .2rem; color: var(--muted); }
.icon.slot-weapon { border-bottom-color: var(--weapon); } .icon.slot-vitality { border-bottom-color: var(--vitality); } .icon.slot-spirit { border-bottom-color: var(--spirit); }
.skills table { min-width: 0; width: auto; }
.skills th { white-space: nowrap; font-size: .85rem; color: var(--text); background: none; padding: .3rem .6rem .3rem 0; }
.aname { display: flex; align-items: center; gap: .4rem; }
.skills th img { border-radius: 5px; background: #000; }
.skills td { width: 30px; min-width: 30px; padding: .25rem 0; text-align: center; font-size: .75rem; border-left: 1px solid var(--line); }
.skills td.on { background: var(--accent); color: #1a1410; font-weight: 600; }
.skills td.unlock { background: var(--good); }
.sectionnote { color: var(--muted); font-size: .9rem; margin-top: -.3rem; }
.searchbar { display: flex; gap: .5rem; max-width: 520px; margin: 1rem 0 .5rem; }
.searchbar input { flex: 1; min-width: 0; padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.searchbar input:focus-visible, .searchbar button:focus-visible { outline: 2px solid var(--accent); }
.searchbar button { padding: .6rem 1.1rem; border-radius: 8px; border: 0; background: var(--accent); color: #1a1410; font: 600 1rem "Kanit", sans-serif; cursor: pointer; }
.presults { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.presults a { display: flex; gap: .6rem; align-items: center; padding: .5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; min-width: 0; }
.presults img { border-radius: 6px; flex: none; }
.presults span { display: flex; flex-direction: column; min-width: 0; }
.presults b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presults small { color: var(--muted); }
.phead { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.phead img { border-radius: 10px; }
.phead h2 { margin: 0 0 .3rem; }
.rank { display: inline-flex; align-items: center; gap: .4rem; }
a.item, a.icon { text-decoration: none; color: inherit; }
a.item:hover, a.icon:hover img { outline: 2px solid var(--accent); outline-offset: 1px; }
.crumbs { color: var(--muted); font-size: .85rem; margin: 1rem 0 0; }
.ihead { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; margin-top: .5rem; }
.ihead > img { border-radius: 14px; background: #000; border: 3px solid var(--line); }
.ihead.slot-weapon > img { border-color: var(--weapon); } .ihead.slot-vitality > img { border-color: var(--vitality); } .ihead.slot-spirit > img { border-color: var(--spirit); }
.ihead h1 { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-size: .8rem; padding: .1rem .55rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.chip.cost { color: var(--accent); }
.isec h3 { margin-top: .6rem; }
.desc { white-space: pre-line; }
.desc b { color: var(--accent); font-weight: 600; }
.props { list-style: none; padding: 0; margin: .5rem 0; border: 1px solid var(--line); border-radius: 8px; }
.props li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .7rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.props li:last-child { border-bottom: 0; }
/* Global search */
.gsearch { position: relative; display: flex; align-items: center; gap: .4rem; flex: 1 1 260px; max-width: 420px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .25rem .3rem .25rem .7rem; }
.gsearch:focus-within { border-color: var(--accent); }
.gicon { color: var(--muted); font-size: 1.1rem; }
.gsearch input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; padding: .35rem 0; outline: none; }
.gsearch button { border: 0; border-radius: 7px; background: var(--accent); color: #1a1410; font: 600 .85rem "Kanit", sans-serif; padding: .4rem .7rem; cursor: pointer; white-space: nowrap; }
.gsearch.big { max-width: 640px; padding: .45rem .45rem .45rem 1rem; border-radius: 14px; }
.gsearch.big input { font-size: 1.1rem; }
.gsearch.big button { font-size: 1rem; padding: .6rem 1.1rem; }
.gsugg { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; list-style: none; margin: 0; padding: .3rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.gsugg a, .gsugg .sugg-player { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .4rem .5rem; border-radius: 7px; text-decoration: none; color: var(--text); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.gsugg a:hover, .gsugg .sugg-player:hover, .gsugg a:focus-visible { background: var(--line); }
.gsugg img { border-radius: 6px; background: #000; }
.gsugg small { margin-left: auto; color: var(--muted); }
.sugg-player { color: var(--accent) !important; }
/* Home */
.hero-home { text-align: center; position: relative; isolation: isolate; margin: 0 calc(50% - 50vw); padding: 4.5rem max(16px, calc(50vw - 560px)) 3rem;
  background: linear-gradient(180deg, rgba(18,16,20,.55) 0%, rgba(18,16,20,.72) 55%, var(--bg) 100%), url(bg-home.webp) center 38% / cover no-repeat; }
.hero-home::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(18,16,20,.6), transparent 75%); }
@media (max-width: 700px) { .hero-home { background-image: linear-gradient(180deg, rgba(18,16,20,.55) 0%, rgba(18,16,20,.75) 55%, var(--bg) 100%), url(bg-home-sm.webp); } }
.hero-home .tagline { color: #d8cfc2; text-shadow: 0 1px 6px #000; }
.hero-home .quick { color: #d8cfc2; }
.brand { font: 600 clamp(2.4rem, 7vw, 4rem) "Kanit", sans-serif; letter-spacing: .02em; margin: 0; }
.brand span { color: var(--accent); }
.tagline { color: var(--muted); margin: .3rem 0 1.4rem; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .45rem; margin-top: 1.1rem; color: var(--muted); font-size: .85rem; }
.quick img { border-radius: 50%; background: #000; border: 2px solid var(--line); transition: border-color .15s; }
.quick a:hover img { border-color: var(--accent); }
.shead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.shead a { color: var(--accent); font-size: .9rem; text-decoration: none; }
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.bcardh { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; min-width: 0; }
.bcardh:hover { border-color: var(--accent); }
.bcardh .art { height: 110px; background: linear-gradient(180deg, #2a2430, #17141a); display: flex; justify-content: flex-end; overflow: hidden; }
.bcardh .art img { height: 150px; width: auto; object-fit: cover; object-position: top; }
.binfo { padding: .6rem .75rem .75rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.bname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bnums { display: flex; justify-content: space-between; margin-top: .4rem; }
.bnums span { display: flex; flex-direction: column; }
.bnums b { font: 600 1.35rem "Kanit", sans-serif; }
.bnums small { color: var(--muted); font-size: .72rem; }
.rankno { color: var(--muted); width: 1.2rem; }
.center { text-align: center; }
@media (max-width: 640px) { .gsearch:not(.big) { order: 3; flex-basis: 100%; max-width: none; } }
/* Player tags */
.tags { list-style: none; padding: 0; margin: .5rem 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { display: flex; flex-direction: column; padding: .4rem .75rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); max-width: 100%; }
.tag b { font: 600 1rem "Kanit", sans-serif; }
.tag small { color: var(--muted); font-size: .8rem; }
.tag.good { border-color: color-mix(in srgb, var(--good) 55%, transparent); } .tag.good b { color: var(--good); }
.tag.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); } .tag.bad b { color: var(--bad); }
.tag.neutral b { color: var(--accent); }
.legend { margin: 1.5rem 0 .5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; }
.legend summary { cursor: pointer; font-weight: 600; }
.more { margin: .6rem 0; padding: .5rem 1rem; background: var(--panel); color: var(--text, inherit); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; }
.more:hover { border-color: var(--accent); }
#profile td, #profile th { white-space: nowrap; }
/* Last-updated counter */
.updated { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }
.updated b { color: var(--text, #eee); font-weight: 600; }
.updated .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.updated.stale .dot { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent); }
/* Logo images */
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { display: block; height: 48px; width: auto; }
.brand img { display: block; width: min(100%, 520px); height: auto; margin: 0 auto; }

.hero-home .updated { justify-content: center; margin-top: 1.4rem; color: #cfc6b8; }
/* Item category tabs */
.itabs { position: sticky; top: 57px; z-index: 3; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem 0; margin-bottom: .5rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.itab { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); font: 500 .95rem "Kanit", sans-serif; cursor: pointer; }
.itab small { color: var(--muted); font-size: .78rem; }
.itab .dot { width: 10px; height: 10px; border-radius: 50%; }
.itab-weapon .dot { background: var(--weapon); } .itab-vitality .dot { background: var(--vitality); } .itab-spirit .dot { background: var(--spirit); }
.itab:hover { border-color: var(--muted); }
.itab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.itab-weapon.on { border-color: var(--weapon); background: color-mix(in srgb, var(--weapon) 22%, var(--panel)); }
.itab-vitality.on { border-color: var(--vitality); background: color-mix(in srgb, var(--vitality) 22%, var(--panel)); }
.itab-spirit.on { border-color: var(--spirit); background: color-mix(in srgb, var(--spirit) 22%, var(--panel)); }
.ifind { margin-left: auto; min-width: 0; flex: 0 1 220px; padding: .4rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
@media (max-width: 700px) { .itabs { top: 0; position: static; } .ifind { flex: 1 1 100%; margin-left: 0; } }
.islot h2 { scroll-margin-top: 130px; }
[hidden] { display: none !important; }
.ttabs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .9rem; }
.ttab { padding: .2rem .7rem; border-radius: 6px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); font: 500 .88rem "Kanit", sans-serif; cursor: pointer; }
.ttab b { color: var(--accent); font-weight: 600; margin-right: .15rem; }
.ttab:hover { border-color: var(--muted); }
.ttab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); }
/* Hero select grid */
.hbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin: .5rem 0 1rem; }
.hfilter, .hctrl { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.hchip { padding: .3rem .8rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); font: 500 .92rem "Kanit", sans-serif; cursor: pointer; }
.hchip small { color: var(--muted); font-size: .75rem; }
.hchip:hover { border-color: var(--muted); }
.hchip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); }
.hfind, .hsort { padding: .38rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: .92rem; }
.hfind { width: 160px; }
.hview { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hview button { padding: .38rem .8rem; background: var(--panel); color: var(--muted); border: 0; font: 500 .9rem "Kanit", sans-serif; cursor: pointer; }
.hview button.on { background: var(--accent); color: #1a1410; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
.pick { --ty: var(--accent); position: relative; display: block; aspect-ratio: 280 / 380; border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--text);
  background: linear-gradient(160deg, #2a2530, #15131a); border: 1px solid var(--line); box-shadow: 0 4px 14px #0006; transition: transform .15s, border-color .15s, box-shadow .15s; }
.pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .25s; }
.pick:hover, .pick:focus-visible { transform: translateY(-3px); border-color: var(--ty); box-shadow: 0 8px 22px #000a, 0 0 0 1px var(--ty); }
.pick:hover img { transform: scale(1.04); }
.hinfo { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .6rem .5rem; display: flex; flex-direction: column; gap: .1rem;
  background: linear-gradient(180deg, transparent, rgba(12,10,14,.88) 38%, #0c0a0e); border-top: 0; }
.hinfo::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ty); }
.hinfo b { font: 600 1rem/1.2 "Kanit", sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.hmeta { display: flex; justify-content: space-between; align-items: center; gap: .3rem; font-size: .78rem; }
.htype { color: var(--ty); font-weight: 600; }
.hdiff { display: inline-flex; gap: 2px; } .hdiff i { width: 7px; height: 7px; border-radius: 2px; background: #ffffff26; transform: rotate(45deg); } .hdiff i.on { background: var(--text); }
.hwin { font-size: .75rem; color: var(--muted); }
.htier { position: absolute; top: .4rem; right: .4rem; font-size: .8rem; box-shadow: 0 2px 6px #0008; }
.ty-brawler { --ty: #e8794f; } .ty-marksman { --ty: #e8b25a; } .ty-mystic { --ty: #b07ee0; } .ty-assassin { --ty: #e05a7a; } .ty-healer { --ty: #6cc48a; }
.hchip.ty-brawler.on, .hchip.ty-marksman.on, .hchip.ty-mystic.on, .hchip.ty-assassin.on, .hchip.ty-healer.on { border-color: var(--ty); background: color-mix(in srgb, var(--ty) 20%, var(--panel)); }
@media (max-width: 700px) { .hgrid { grid-template-columns: repeat(3, 1fr); gap: .5rem; } .hinfo b { font-size: .82rem; } .hwin { display: none; } .hfind { flex: 1; width: auto; } .hctrl { width: 100%; } }
/* Phone menu */
.menu { display: none; margin-left: auto; width: 42px; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.menu span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.top.open .menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.top.open .menu span:nth-child(2) { opacity: 0; }
.top.open .menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 640px) {
  .top { position: static; }
  .top .row { gap: .6rem; padding-block: .5rem; }
  .menu { display: flex; }
  .top nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; gap: 2px; padding: .3rem 0 .2rem; border-top: 1px solid var(--line); }
  .top.open nav { display: flex; }
  .top nav a { padding: .6rem .7rem; font-size: 1.02rem; }
}
/* 404 */
.nf { text-align: center; padding: 2.5rem 0 3rem; }
.nf-code { font: 600 clamp(4rem, 16vw, 7rem)/1 "Kanit", sans-serif; color: var(--accent); margin: 0; opacity: .9; }
.nf h1 { margin: .3rem 0; }
.nf .gsearch { margin: 1.2rem auto; max-width: 560px; }
.nf-links { margin: .8rem 0 1.2rem; }
/* Rising / falling arrows */
.hcard { position: relative; }
.hcard .trend { position: absolute; top: 4px; left: 4px; padding: 0 .3rem; border-radius: 4px; font: 600 .7rem/1.5 "Kanit", sans-serif; background: #0c0a0ecc; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); }
.tlegend .trend { position: static; background: none; padding: 0; }
.nf .lead { margin-inline: auto; }
/* Share card */
.sharebtn { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .9rem; border-radius: 8px; border: 0; background: var(--accent); color: #1a1410; font: 600 .95rem "Kanit", sans-serif; cursor: pointer; text-decoration: none; }
.sharebtn.ghost { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.sharebtn:disabled { opacity: .6; cursor: wait; }
.phead .sharebtn { margin-left: auto; }
.cardmodal { position: fixed; inset: 0; z-index: 50; background: #000c; display: grid; place-items: center; padding: 16px; }
.cardbox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-width: 900px; width: 100%; }
.cardbox img { width: 100%; height: auto; border-radius: 8px; display: block; }
.cardacts { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .7rem; flex-wrap: wrap; }
/* Beginner guide */
.gtoc { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1.5rem; }
.gtoc a { padding: .3rem .75rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .9rem; }
.gtoc a:hover { border-color: var(--accent); }
.gsec { margin: 2rem 0; scroll-margin-top: 70px; }
.gsec h2 { border-left: 4px solid var(--accent); padding-left: .6rem; }
.gsteps { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; counter-reset: s; }
.gsteps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .8rem; font-size: .92rem; }
.gsteps li::before { content: counter(s); display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-right: .4rem; border-radius: 50%; background: var(--accent); color: #1a1410; font: 600 .8rem "Kanit", sans-serif; }
.gtime { list-style: none; padding: 0 0 0 1.2rem; margin: 0; border-left: 2px solid var(--line); }
.gtime li { position: relative; display: flex; gap: .9rem; padding: .45rem 0; }
.gtime li::before { content: ""; position: absolute; left: calc(-1.2rem - 6px); top: .95rem; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.gtime time { flex: none; min-width: 6.2rem; font: 600 1rem "Kanit", sans-serif; color: var(--accent); }
.gtime .k-boss::before { background: #ef7a6d; } .gtime .k-camp::before { background: var(--vitality); } .gtime .k-obj::before { background: #5fd3c9; } .gtime .k-item::before { background: var(--accent); } .gtime .k-lane::before { background: var(--spirit); }
.gtips li { margin: .35rem 0; }
.geasy { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.geasyc { display: flex; gap: .6rem; align-items: center; padding: .5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); }
.geasyc:hover { border-color: var(--accent); }
.geasyc img { border-radius: 50%; background: #000; }
.geasyc span { display: flex; flex-direction: column; } .geasyc small { color: var(--muted); }
@media (max-width: 640px) { .gtime li { flex-direction: column; gap: 0; } }
.plist { list-style: none; padding: 0; }
.plist li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.plist a { font-weight: 600; }
.prose { max-width: 70ch; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .25rem 0; }
