/* v56.46 遊戲說明書 (guide.js): a sheet of its own over the game at /guide. It scrolls; one column on a phone, two route cards a row from 600 px.
   Each card is one character's animation in the game's own drawing (a 16:9 canvas) over its rule in a line or two. */
/* The game takes text selection away (a tap in a match must not select a word); the guide gives it back, so its words can be copied. */
#guide{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;touch-action:pan-y;place-items:start center;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#06151df7;padding-top:calc(var(--top) + 4px)}
#guide .guide-sheet{width:min(100%,720px);padding:0 0 calc(var(--bottom) + 18px);color:#e6f1ed;text-align:left}
/* Opening: the backdrop fades in and the sheet rises 18 px into place (opacity and transform only: no layout, nothing to download). None under
   reduced motion. Closing is at once, so whatever is next (the roster, a match) is there without waiting. */
#guide:not(.hidden){animation:guide-fade .22s ease-out}
#guide:not(.hidden) .guide-sheet{animation:guide-rise .26s cubic-bezier(.2,.8,.2,1)}
@keyframes guide-fade{from{opacity:0}}
@keyframes guide-rise{from{opacity:0;transform:translateY(18px)}}
@media(prefers-reduced-motion:reduce){#guide:not(.hidden),#guide:not(.hidden) .guide-sheet{animation:none}}
#guide .guide-top{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 -4px;padding:8px 4px 10px;background:linear-gradient(#06151d 72%,#06151d00)}
#guide .guide-top h2{margin:0;font-size:26px;font-weight:900;letter-spacing:.04em;color:var(--paper)}
#guide .guide-x{flex:none;width:44px;min-height:44px;height:44px;margin:0;padding:0;border:1px solid #6d8f9666;border-radius:10px;background:#0b222b;color:var(--paper);font-size:18px;line-height:1}
#guide .guide-lead{margin:2px 0 16px;font-size:16px;line-height:1.7}
#guide .guide-lead b{color:var(--gold)}
#guide h3{margin:22px 0 10px;font-size:17px;font-weight:900;color:var(--paper)}
#guide .guide-routes{display:grid;grid-template-columns:1fr;gap:12px}
#guide .guide-card{margin:0;overflow:hidden;border:1px solid #6d8f9644;border-radius:12px;background:#0b222b}
/* index.html sizes every canvas to its box and takes its touches (the match's): these keep their 16:9 and let a finger scroll the sheet. */
#guide .guide-scene{display:block;width:100%;height:auto;aspect-ratio:16/9;touch-action:pan-y;background:#0b222b}
#guide .guide-card figcaption{padding:11px 14px 14px;font-size:16px;line-height:1.6;color:#e6f1ed}
#guide .guide-card figcaption b{display:block;margin-bottom:4px;font-size:19px;font-weight:900;color:var(--gold)}
#guide .guide-wide{margin-bottom:10px}
#guide .guide-keys{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:0;padding:0;list-style:none}
#guide .guide-keys li{padding:10px 12px;border:1px solid #6d8f9644;border-radius:10px;background:#0b222bcc;font-size:15px;line-height:1.5}
#guide .guide-keys b{display:block;font-size:17px;color:var(--paper)}
/* Key caps only with a keyboard (html.keys), in each card's corner as the old menu's are above its cards: showing them moves nothing. */
#guide .guide-keys li{position:relative}
html.keys #guide .guide-keys .kr{top:8px;right:8px;left:auto;transform:none}
#guide .guide-text,#guide .guide-list{font-size:16px;line-height:1.7}
#guide .guide-text b,#guide .guide-list b{color:var(--paper)}
#guide .guide-list{margin:0;padding-left:20px}
#guide .guide-list li{margin-bottom:6px}
#guide .guide-go{display:flex;gap:10px;margin:24px 0 12px}
#guide .guide-go button{flex:1;min-width:0;margin:0}
#guide .guide-go .hidden{display:none}
#guide .guide-fine{margin:0;text-align:center;font-size:12px;color:#a9c7bf}
#guide .guide-link{display:inline;width:auto;min-height:0;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px}
@media(min-width:600px){#guide .guide-routes{grid-template-columns:1fr 1fr}}
@media(orientation:landscape) and (max-height:550px){#guide .guide-top h2{font-size:22px}#guide .guide-lead{font-size:14px}}
