/* Hai trang hướng dẫn Silkroad Mobile (cài đặt, auto train). Riêng cho game này; các trang hướng dẫn khác dùng /huong-dan/guide.css. */
:root {
  --sand: #F3EBDC; --sand2: #EADFCB; --card: #FBF7EE; --ink: #161311;
  --text: #161311; --muted: #4A423A; --orange: #F07A1F; --orange2: #B5500B; --orange3: #FFB067;
  --line: rgba(22,19,17,.16);
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--sand); color: var(--text); font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.7; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5; z-index: 0; background: url(/img/bg-ant.svg) 0 0 / 320px 320px repeat; }
a { color: var(--orange2); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; position: relative; }
main, footer { position: relative; z-index: 1; }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 10; background: rgba(243,235,220,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
header img { width: 32px; height: 32px; border-radius: 8px; }
header .brand { font-weight: 800; font-size: 19px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); white-space: nowrap; }
header .brand b { color: var(--orange2); font-weight: 800; }
header .crumb { font-size: 14px; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
header nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; font-weight: 500; align-items: center; }
header nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
header nav a:hover { color: var(--text); text-decoration: underline; }
header nav .cta { color: var(--ink); background: var(--orange); padding: 8px 18px; border-radius: 999px; font-weight: 700; transition: background .2s; }
header nav .cta:hover { background: var(--orange3); text-decoration: none; }
#progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--orange); }

/* ---------- intro ---------- */
.hero { padding: 56px 0 30px; max-width: 760px; }
.hero .game { margin: 0 0 12px; font-size: 16px; color: var(--muted); }
.hero .game b { color: var(--text); font-weight: 800; }
h1 { font-size: 40px; line-height: 1.22; margin: 0 0 16px; font-weight: 800; letter-spacing: -.02em; }
.hero .lead { font-size: 18px; color: var(--muted); margin: 0 0 14px; }
.hero .meta { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.hero .next { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 200px minmax(0, 720px); gap: 56px; padding-bottom: 72px; align-items: start; }
.toc { position: sticky; top: 90px; display: flex; flex-direction: column; font-size: 15px; }
.toc .t { font-weight: 700; margin-bottom: 8px; }
.toc a { color: var(--muted); text-decoration: none; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.cur { color: var(--text); font-weight: 700; border-left-color: var(--orange); }

/* ---------- steps ---------- */
.step { padding: 0 0 44px; margin: 0 0 44px; border-bottom: 1px solid var(--line); }
.step:last-of-type { border-bottom: 0; margin-bottom: 0; }
.step .num { font-size: 15px; font-weight: 800; color: var(--orange2); margin-bottom: 4px; }
.step .num::before { content: "Bước "; }
.step h2 { font-size: 27px; line-height: 1.3; margin: 0 0 6px; font-weight: 800; letter-spacing: -.01em; }
.step h2 em { font-style: normal; }
.step .where { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.step p { margin: 0 0 14px; }
.step ul, .step ol { margin: 0 0 14px; padding-left: 22px; }
.step li { margin-bottom: 8px; }
.step li:last-child { margin-bottom: 0; }
.step > * { min-width: 0; max-width: 100%; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; background: var(--sand2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; overflow-wrap: anywhere; word-break: break-word; }
kbd { background: var(--card); border-bottom-width: 2px; }

.tip { margin: 18px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--orange); color: var(--text); }
.tip > div { margin: 0; }

.fig { margin: 22px 0 6px; }
.frame { border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(60,40,10,.12); overflow: hidden; }
.frame img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.cap { margin-top: 10px; font-size: 14px; color: var(--muted); }
.cap b { display: none; }

/* ---------- faq ---------- */
.faq { padding-top: 8px; }
.faq h2 { font-size: 27px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; margin: 0 0 14px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

footer { background: var(--ink); color: var(--sand); padding: 26px 0 44px; font-size: 14px; }
footer a { color: var(--orange3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---------- lightbox ---------- */
#lb { position: fixed; inset: 0; z-index: 50; background: rgba(22,19,17,.86); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
#lb.show { display: flex; }
#lb img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  h1 { font-size: 32px; }
  .hero { padding: 36px 0 24px; }
  .step h2, .faq h2 { font-size: 24px; }
  header nav a:not(.cta) { display: none; }
  header .crumb { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  header .wrap { height: 58px; }
  header img { width: 30px; height: 30px; }
  header .brand { font-size: 17.5px; }
  header nav .cta { padding: 8px 15px; font-size: 14.5px; }

  .hero { padding: 28px 0 22px; }
  h1 { font-size: 28px; line-height: 1.22; }
  .hero .lead { font-size: 16.5px; }
  .hero .meta, .hero .next { font-size: 14.5px; }

  .step { padding-bottom: 32px; margin-bottom: 32px; }
  .step h2, .faq h2 { font-size: 22px; }
  .step .num { font-size: 14px; }
  .step .where { font-size: 14px; margin-bottom: 12px; }
  .step p, .step li { font-size: 16.5px; }
  .step ul, .step ol { padding-left: 20px; }
  .step li { margin-bottom: 7px; }

  .fig { margin: 18px 0 6px; }
  .cap { font-size: 13px; margin-top: 8px; }
  .tip { margin: 16px 0; padding-left: 14px; }
  .faq details { padding: 13px 0; }
  .faq summary { font-size: 16px; }
  .faq details p { font-size: 15.5px; }
  kbd, code { font-size: .84em; }

  footer { padding: 22px 0 calc(34px + env(safe-area-inset-bottom)); font-size: 13.5px; }
  footer nav { gap: 6px 16px; }
  #lb { padding: 14px; }
}
