/* Guide: the landing page's sky and waterline on top, plain reading below. Commands are drawn
   as the game's chat bar and copy on click; the chapter list is the game's world-select list. */
.sky { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0%, var(--sky) 40%, var(--sky-low) 100%); border-bottom: 16px solid var(--sea); box-shadow: inset 0 -4px 0 #D9CFA0; }
.sky::before { content: ""; position: absolute; top: 84px; left: 58%; width: 96px; height: 12px; background: rgba(255,255,255,.86);
  box-shadow: 28px -8px 0 -2px rgba(255,255,255,.86), 260px 56px 0 0 rgba(255,255,255,.86), 300px 46px 0 -2px rgba(255,255,255,.86); }
.sky > * { position: relative; }
.head { padding-block: 26px 46px; }
.head h1 { margin: 0; font: 900 clamp(54px, 10vw, 104px)/.9 var(--display); color: var(--azure-deep); }
.head p { margin-top: 14px; font: 600 clamp(18px, 2.6vw, 22px)/1.35 var(--body); color: var(--azure-deep); max-width: 34ch; }
.cr { display: inline-block; width: .95em; height: .68em; margin-right: .18em; vertical-align: baseline;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 5' shape-rendering='crispEdges'%3E%3Cpath fill='%23C98A00' d='M0 0h1v1h1v1h1V0h1v2h1V1h1V0h1v5H0z'/%3E%3C/svg%3E") center/contain no-repeat; }

.book { display: grid; grid-template-columns: 250px minmax(0, 680px); gap: 72px; padding-block: 48px 72px; align-items: start; }

/* ---------- chapter list ---------- */
aside { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--slate); padding: 12px; font: 500 16px/1.25 var(--body); color: var(--white); }
aside label { display: block; margin-bottom: 6px; color: var(--mc-grey); font-size: 15px; }
#search { width: 100%; height: 40px; padding: 0 10px; background: #000; border: 2px solid #A0A0A0; color: var(--white); font: 500 18px/1 var(--pixel); border-radius: 0; -webkit-appearance: none; appearance: none; }
#search:focus { outline: none; border-color: var(--white); }
#search::placeholder { color: #707070; }
#search-count { min-height: 1.2em; margin: 6px 0 4px; color: var(--or-pale); font-size: 15px; }
#toc { display: grid; gap: 2px; }
#toc a { padding: 7px 8px; border: 2px solid transparent; text-decoration: none; color: var(--mc-grey); }
#toc a:hover { color: var(--white); }
#toc a.here { border-color: var(--white); color: var(--white); background: #000; }
#toc a.miss { color: #555; }

/* ---------- reading ---------- */
main > * + * { margin-top: 0; }
.notice { padding: 14px 18px; background: var(--ground-2); border-left: 6px solid var(--or); font-size: 17px; }
.chapter { padding-top: 56px; scroll-margin-top: 0; }
.chapter[hidden] { display: none; }
.chapter h2 { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); font: 800 clamp(38px, 6vw, 54px)/.95 var(--display); color: var(--azure); }
.chapter h3 { margin: 30px 0 12px; font: 800 28px/1 var(--display); color: var(--ink); }
.chapter > p, .chapter > ul { margin-top: 16px; }
.chapter a:not(.mcbtn), .notice a { color: var(--azure); font-weight: 700; }
.chapter ul { padding-left: 22px; margin-bottom: 0; }
.chapter ul li + li { margin-top: 8px; }
.small { font-size: 16px; color: var(--ink-soft); }
.updated { margin-top: 56px; }

.cmds { margin: 22px 0 0; display: grid; }
.cmds > div { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 6px 20px; align-items: center; padding-block: 8px; border-top: 1px solid var(--rule); }
.cmds > div:last-child { border-bottom: 1px solid var(--rule); }
.cmds dd { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.45; }
.cmd { position: relative; width: 100%; min-height: 36px; padding: 5px 10px 6px; border: 0; background: rgba(0, 0, 0, .78); color: var(--white); font: 500 18px/1.25 var(--pixel); text-align: left; cursor: pointer; overflow-wrap: anywhere; text-shadow: 2px 2px 0 #3F3F3F; }
.cmd:hover, .cmd:focus-visible { background: #000; }
.cmd:hover::after, .cmd:focus-visible::after, .cmd.done::after { content: "copy"; position: absolute; right: 8px; top: 50%; translate: 0 -50%; padding-left: 8px; background: #000; color: var(--mc-grey); font-size: 15px; text-shadow: none; }
.cmd.done::after { content: "copied"; color: var(--mc-green); }

.steps { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 2px 0; padding-block: 13px; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(s); grid-row: span 2; width: 40px; height: 40px; margin-top: 2px; display: grid; place-items: center; background: var(--azure); box-shadow: inset 3px 3px 0 #3F5CB8, inset -3px -3px 0 var(--azure-deep); color: var(--or); font: 700 24px/1 var(--pixel); text-shadow: 2px 2px 0 var(--azure-deep); padding-bottom: 2px; }
.steps b { font-weight: 700; }
.steps span { grid-column: 2; color: var(--ink-soft); font-size: 17px; }

/* the game's advancement toast */
.toast { margin-top: 22px; display: grid; gap: 4px; padding: 12px 16px 14px; background: #212121; border: 2px solid #555; outline: 2px solid #000; color: var(--white); font-size: 17px; line-height: 1.5; }
.toast b { font: 500 18px/1.3 var(--pixel); color: var(--mc-yellow); }
.toast kbd { background: #000; }
.toast .cr { filter: brightness(1.25); }

.editions { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.editions h3 { margin-top: 0; }
.editions p { margin-top: 12px; font-size: 16px; color: var(--ink-soft); }
.facts { margin: 0 0 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font: 500 19px/1.45 var(--pixel); overflow-wrap: anywhere; }

.ranktable { margin-top: 22px; background: var(--azure); color: var(--white); padding: 6px 18px 10px; overflow-x: auto; }
.ranktable table { width: 100%; border-collapse: collapse; font-size: 17px; font-variant-numeric: tabular-nums; }
.ranktable th, .ranktable td { padding: 9px 10px 9px 0; text-align: right; white-space: nowrap; }
.ranktable :is(th, td):first-child { text-align: left; }
.ranktable thead th { font: 400 15px/1.2 var(--body); color: #C9D5F5; }
.ranktable tbody tr { border-top: 1px solid rgba(255, 255, 255, .18); }
.ranktable tbody th { color: var(--c); font: 600 18px/1.2 var(--pixel); }

.qa { margin: 4px 0 26px; }
.qa dt { margin-top: 20px; font-weight: 700; }
.qa dd { margin: 4px 0 0; color: var(--ink-soft); }

@media (max-width: 940px) {
  .book { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 28px 56px; }
  aside { position: static; max-height: none; }
  #toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter { padding-top: 44px; }
}
@media (max-width: 560px) {
  .cmds > div { grid-template-columns: minmax(0, 1fr); }
  .editions { grid-template-columns: minmax(0, 1fr); }
  #toc a { padding: 6px; font-size: 15px; }
  .head { padding-block: 14px 34px; }
}
@media (max-width: 700px) { .sky::before { display: none; } }
