/* Chapter rail (always there, a thin segmented line; unfolds when the pointer is near the bottom edge), quick-jump palette, "Back to N" chip. See js/nav.js. */
.deck-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 0 24px 12px; pointer-events: none; font-family: "Neue Haas Unica Pro", Arial, Helvetica, sans-serif; }
.deck-rail[hidden] { display: none; }
.deck-rail ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 4px; }
.deck-rail .seg { position: relative; min-width: 0; height: 6px; transition: height .2s ease; }
.deck-rail .seg-b { position: absolute; inset: 0; display: flex; align-items: center; padding: 0; border: 0; border-radius: 3px; overflow: hidden; background: rgba(110, 132, 188, .5); box-shadow: 0 0 0 1px rgba(12, 31, 76, .22); color: #fff; font: inherit; pointer-events: none; transition: background .15s ease; }
.deck-rail .seg-fill { position: absolute; left: 0; bottom: 0; height: 100%; width: 0; background: #ECC215; transition: width .3s ease; }
.deck-rail .seg-lab { position: relative; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .15s ease; }
.deck-rail .seg-tip { position: absolute; bottom: calc(100% + 12px); left: 50%; width: 224px; box-sizing: border-box; padding: 10px; border-radius: 14px; background: #fff; color: #0C1F4C; box-shadow: 0 18px 36px -14px rgba(3, 12, 40, .6); display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateX(-50%) translateY(6px); pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.deck-rail .seg:first-child .seg-tip { left: 0; transform: translateY(6px); }
.deck-rail .seg:last-child .seg-tip { left: auto; right: 0; transform: translateY(6px); }
.deck-rail .seg-tip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #E6EDFA; }
.deck-rail .seg-tip b { font-size: 15px; line-height: 1.2; color: #003087; }
.deck-rail .seg-tip span { font-size: 13px; color: #394B75; }

.deck-rail.open { pointer-events: auto; }
.deck-rail.open .seg { height: 40px; }
.deck-rail.open .seg-b { pointer-events: auto; cursor: pointer; border-radius: 10px; background: rgba(10, 26, 78, .88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.deck-rail.open .seg-fill { height: 4px; }
.deck-rail.open .seg-lab { opacity: 1; }
.deck-rail.open .seg.cur .seg-b { background: rgba(0, 48, 135, .96); }
.deck-rail.open .seg:hover .seg-b { background: #0056BF; }
.deck-rail.open .seg:hover .seg-tip { opacity: 1; transform: translateX(-50%); }
.deck-rail.open .seg:first-child:hover .seg-tip, .deck-rail.open .seg:last-child:hover .seg-tip { transform: none; }

/* the control bar sits above the rail */
.deck-dock { height: 220px; padding-bottom: 72px; }
.deck-dock.rail-open .deck-bar { opacity: 1; transform: none; pointer-events: auto; }

.deck-chip { position: fixed; left: 24px; bottom: 34px; z-index: 62; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px 0 14px; border: 0; border-radius: 999px; background: #fff; color: #003087; font: 700 15px "Neue Haas Unica Pro", Arial, Helvetica, sans-serif; cursor: pointer; box-shadow: 0 12px 24px -10px rgba(3, 12, 40, .55); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, bottom .2s ease; }
.deck-chip[hidden] { display: none; }
.deck-chip.show { opacity: 1; transform: none; }
.deck-chip kbd { padding: 2px 8px; border-radius: 6px; background: #E6EDFA; color: #394B75; font-weight: 800; font-size: 12px; font-family: inherit; }
.deck-chip:focus-visible { outline: 3px solid #ECC215; outline-offset: 2px; }
body.rail-open .deck-chip { bottom: 152px; }

.deck-pal { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 0; box-sizing: border-box; background: rgba(6, 20, 60, .6); font-family: "Neue Haas Unica Pro", Arial, Helvetica, sans-serif; }
.deck-pal.open { display: flex; }
.pal-box { width: min(680px, 100%); box-sizing: border-box; padding: 18px; border-radius: 22px; background: #fff; color: #0C1F4C; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); display: flex; flex-direction: column; gap: 14px; }
.pal-field { display: flex; align-items: center; min-height: 56px; border-radius: 14px; border: 2px solid #0056BF; padding: 0 16px; }
.pal-q { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 20px "Neue Haas Unica Pro", Arial, Helvetica, sans-serif; color: #0C1F4C; }
.pal-q::placeholder { color: #55648A; font-weight: 500; }
.pal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.pal-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; }
.pal-item.on { background: #E6EDFA; }
.pal-item img { display: block; width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: #E6EDFA; }
.pal-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pal-t b { font-size: 17px; line-height: 1.25; }
.pal-t i { font-size: 13px; font-style: normal; color: #55648A; }
.pal-n { padding: 4px 10px; border-radius: 8px; background: #E6EDFA; color: #003087; font-size: 14px; font-weight: 800; }
.pal-item.on .pal-n { background: #fff; }
.pal-none { padding: 14px 8px; font-size: 16px; color: #55648A; }
.pal-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #DCE3F0; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #55648A; }
.pal-keys { font-size: 13px; font-weight: 500; letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) { .deck-rail *, .deck-chip { transition: none !important; } }

/* 2026-11-27: the invisible hover zone of the presenter dock (600 x 220 px, over the first chapters of the rail) swallowed the clicks on INTRO, YARD, INTRALOG... - exactly the chapters you want to go BACK to.
   The zone now starts above the rail (the rail is 52 px tall when open); the bar itself stays where it was. */
.deck-dock { bottom: 60px; height: 160px; padding-bottom: 12px; }
