/* Hand D page: the "magic layer" */
@font-face { font-family: "Junicode HD"; src: url("fonts/junicode-hand-d.woff2") format("woff2"); font-display: swap; }
.hd-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; background: var(--panel); border: 1px solid var(--rule); border-top: 4px solid var(--gold); border-radius: 10px; padding: 12px 18px; margin: 18px 0 22px; position: sticky; top: 0; z-index: 5; }
.hd-controls label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.hd-lbl { font-weight: 700; }
.hd-jump { margin-left: auto; font-size: .95rem; }
.hd-page { margin: 0 0 34px; }
.hd-page h2 { font-size: 1.3rem; margin: 0 0 8px; }
.hd-fig { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #1c140c; touch-action: manipulation; cursor: crosshair; outline-offset: 3px; }
.hd-fig img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.hd-layer { position: absolute; inset: 0; pointer-events: none; }
.hd-read { position: absolute; transform: translateY(-100%); white-space: nowrap; font-family: "Junicode HD", "EB Garamond", Georgia, serif; color: #fff; line-height: 1.15;
  background: rgba(24, 15, 6, .62); padding: .08em .35em .12em; border-radius: .25em; text-shadow: 0 1px 2px rgba(0,0,0,.8);
  opacity: 0; transition: opacity .25s ease-out; }
.hd-read.on { opacity: 1; }
.hd-read.off { opacity: 0; transition: opacity 1.1s ease-in; }
.hd-read.all { opacity: .9; background: rgba(24, 15, 6, .5); }
.hd-mark { position: absolute; border-bottom: 2px solid rgba(255, 214, 120, .9); opacity: 0; transition: opacity .25s; }
.hd-mark.on { opacity: 1; }
.hd-info { min-height: 3.2em; margin: 8px 2px 0; font-size: 1rem; }
.hd-info .n { font-weight: 700; color: var(--gold); margin-right: .4em; }
.hd-info .t { font-family: "Junicode HD", "EB Garamond", Georgia, serif; font-size: 1.15em; }
.hd-info .s { font-style: italic; margin-right: .4em; }
.hd-info .notes { display: block; font-size: .85rem; color: var(--muted); }
.hd-key { margin-top: 10px; }
.hd-key li { margin-bottom: .45em; }
@media (max-width: 640px) { .hd-jump { margin-left: 0; } .hd-controls { position: static; } }
