/* ==========================================================================
   Moment You've Been Waiting For — scroll-driven page-turning book
   Page geometry (--pw, --ph, --fs) is set by js/book.js on <html>.
   ========================================================================== */

:root {
  --pw: 420px;
  --ph: 600px;
  --fs: 17px;
  --barh: 56px;

  --ink: #2b2018;
  --ink-soft: #6e5a48;
  --paper: #f5ecd9;
  --accent: #8a3324;
  --gold: #b08a4e;
  --night: #22071b;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --fell: "IM Fell English", "EB Garamond", Georgia, serif;
  --fellsc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --hand: "Caveat", "Segoe Script", cursive;

  /* fine paper grain */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 .22 0 0 0 -.04'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* coarse mottling for the cover */
  --mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .02' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* speckled holes, used as a mask for worn lettering */
  --wear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -7 0 0 0 4.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html {
  background: var(--night);
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--night);
  color: #f7d6dc;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

/* Tall invisible element that gives the page something to scroll. One snap point per page turn. */
.spacer { position: relative; width: 1px; pointer-events: none; }
.snap {
  position: absolute; left: 0; width: 1px; height: 1px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ---------- Stage ---------- */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(122, 40, 96, .55), transparent 70%),
    radial-gradient(ellipse at 50% 120%, rgba(20, 0, 14, .6), transparent 60%),
    linear-gradient(#3a0e2d, #1e0618);
}
.stage::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grain);
  opacity: .5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.book {
  position: absolute;
  left: 50%;
  top: calc((100% - var(--barh)) / 2);
  width: var(--bw);
  height: var(--ph);
  perspective: calc(var(--pw) * 6);
  perspective-origin: 50% 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.leaf {
  position: absolute;
  top: 0;
  left: var(--leafx);
  width: var(--pw);
  height: 100%;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
  visibility: hidden;
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 18px 40px -12px rgba(0, 0, 0, .7);
}
.face.back { transform: rotateY(180deg); }

.shade {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: var(--sf, 0);
  background: linear-gradient(to left, rgba(20, 10, 4, .55), rgba(20, 10, 4, .2));
}
.face.back .shade {
  opacity: var(--sb, 0);
  background: linear-gradient(to right, rgba(20, 10, 4, .55), rgba(20, 10, 4, .2));
}

/* Page-edge thickness under the open pages */
.stack {
  position: absolute;
  top: 0;
  width: var(--pw);
  height: 100%;
  background: repeating-linear-gradient(to right, #d9ccb1 0 1px, #efe5cf 1px 3px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7);
  z-index: 0;
}
.stack.r { left: var(--leafx); border-radius: 0 4px 4px 0; }
.stack.l { left: 0; border-radius: 4px 0 0 4px; background: repeating-linear-gradient(to left, #d9ccb1 0 1px, #efe5cf 1px 3px); }

/* ---------- Generic page ---------- */

.page {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.page.right { border-radius: 2px 5px 5px 2px; }
.page.left  { border-radius: 5px 2px 2px 5px; }

.paper {
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    var(--grain),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 60%, rgba(150, 110, 60, .14));
}
.paper.right::before,
.paper.left::before {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 14%;
  pointer-events: none;
}
.paper.right::before { left: 0;  background: linear-gradient(to right, rgba(60, 35, 10, .22), rgba(60, 35, 10, .06) 35%, transparent); }
.paper.left::before  { right: 0; background: linear-gradient(to left,  rgba(60, 35, 10, .22), rgba(60, 35, 10, .06) 35%, transparent); }

/* ---------- Content pages ---------- */

.pg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(var(--ph) * .05) calc(var(--pw) * .095) calc(var(--ph) * .035) calc(var(--pw) * .11);
  font-size: var(--fs);
  line-height: 1.5;
}
.left .pg { padding-left: calc(var(--pw) * .095); padding-right: calc(var(--pw) * .11); }

.run {
  flex: none;
  height: 2.4em;
  font-family: var(--fellsc);
  font-size: .7em;
  letter-spacing: .14em;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .85;
}
.opener .run { visibility: hidden; }

.body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.body p {
  margin: 0;
  text-indent: 1.4em;
  text-align: justify;
}
.body p.first,
.body p.cont { text-indent: 0; }
.body p.first { display: flow-root; }
.body p.split { text-align-last: justify; }
.body p.first::first-letter {
  float: left;
  font-family: var(--fell);
  font-size: 3.15em;
  line-height: .82;
  padding: .07em .09em 0 0;
  color: var(--accent);
}
.body em { font-style: italic; }

.folio {
  flex: none;
  height: 2em;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: var(--fell);
  font-size: .78em;
  color: var(--ink-soft);
}

.chap {
  text-align: center;
  padding: calc(var(--ph) * .05) 0 1.3em;
}
.chap-num {
  font-family: var(--fellsc);
  font-size: .8em;
  letter-spacing: .22em;
  color: var(--accent);
}
.chap-title {
  margin: .3em 0 .45em;
  font-family: var(--fell);
  font-style: italic;
  font-weight: 400;
  font-size: 1.7em;
  line-height: 1.15;
  hyphens: manual;
}
.chap-sub {
  margin-top: .55em;
  font-style: italic;
  color: var(--ink-soft);
}

.orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  color: var(--gold);
}
.orn::before,
.orn::after {
  content: "";
  width: 2.6em;
  height: 1px;
  background: currentColor;
  opacity: .8;
}
.orn i {
  width: .42em;
  height: .42em;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- Cover ---------- */

.cover {
  color: #fff6f3;
  background-color: #7a2860;
  background-image:
    radial-gradient(ellipse 80% 70% at 70% 45%, #a23a7c, transparent 60%),
    radial-gradient(ellipse 70% 55% at 10% 90%, #5b1746, transparent 55%),
    linear-gradient(135deg, #4a1239 0%, #7a2860 55%, #8e3270 100%);
}
.cover.right { border-radius: 3px 7px 7px 3px; }
.cover.left  { border-radius: 7px 3px 3px 7px; }

.cover-photo {
  position: absolute;
  top: -1%;
  right: -2%;
  height: 103%;
  aspect-ratio: 740 / 1164;
  background: var(--cover-img, none) right top / cover no-repeat;
  filter: sepia(.12) saturate(.95) contrast(1.05);
  -webkit-mask-image: linear-gradient(to right, transparent 4%, #000 36%), linear-gradient(to bottom, #000 62%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 4%, #000 36%), linear-gradient(to bottom, #000 62%, transparent 99%);
  mask-composite: intersect;
}

.compass {
  position: absolute;
  left: -16%;
  top: 34%;
  width: 72%;
  opacity: .24;
  mix-blend-mode: screen;
  pointer-events: none;
}

.cover-tex {
  position: absolute; inset: 0;
  background-image: var(--mottle);
  background-size: 100% 100%;
  mix-blend-mode: overlay;
  opacity: .55;
}
.cover-tex::after {
  content: "";
  position: absolute; inset: 0;
  background:
    var(--grain),
    radial-gradient(ellipse 85% 75% at 55% 45%, transparent 50%, rgba(10, 5, 2, .6));
}

.cover-spine {
  position: absolute; top: 0; bottom: 0;
  width: 7%;
  pointer-events: none;
}
.cover.right .cover-spine { left: 0;  background: linear-gradient(to right, rgba(0, 0, 0, .45), rgba(255, 255, 255, .08) 45%, rgba(0, 0, 0, .25) 60%, transparent); }
.cover.left  .cover-spine { right: 0; background: linear-gradient(to left,  rgba(0, 0, 0, .45), rgba(255, 255, 255, .08) 45%, rgba(0, 0, 0, .25) 60%, transparent); }

.cover-top {
  position: absolute;
  top: 5.5%;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--fellsc);
  font-size: calc(var(--pw) * .036);
  letter-spacing: .42em;
  text-indent: .42em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.cover-title {
  position: absolute;
  left: 7%;
  right: 6%;
  bottom: 12.5%;
  line-height: .9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
}
.cover-title .t-big,
.cover-title .t-sub {
  display: block;
  -webkit-mask-image: var(--wear);
  mask-image: var(--wear);
  -webkit-mask-size: calc(var(--pw) * .55);
  mask-size: calc(var(--pw) * .55);
}
.cover-title .t-big {
  font-family: var(--fell);
  font-size: calc(var(--pw) * .245);
  letter-spacing: -.01em;
  margin-left: -.04em;
}
.cover-title .t-sub {
  margin-top: .12em;
  font-family: var(--fell);
  font-style: italic;
  font-size: calc(var(--pw) * .088);
  line-height: 1.05;
}

.cover-by {
  position: absolute;
  left: 7%;
  right: 6%;
  bottom: 5%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--fellsc);
  font-size: calc(var(--pw) * .036);
  letter-spacing: .16em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}
.cover-by .by { font-size: 1.12em; }

/* ---------- Back cover ---------- */

.backcover .bc {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--ph) * .035);
  padding: 0 14%;
  text-align: center;
  font-size: calc(var(--pw) * .042);
}
.bc-quote {
  font-family: var(--fell);
  font-style: italic;
  font-size: 1.55em;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.bc-quote.small { font-size: 1.05em; opacity: .85; }
.bc-cite {
  display: block;
  margin-top: .7em;
  font-family: var(--fellsc);
  font-style: normal;
  font-size: .5em;
  letter-spacing: .2em;
  opacity: .75;
}
.backcover .orn { color: #d2b07a; }
.bc-foot {
  position: absolute;
  bottom: 6%;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--fellsc);
  font-size: calc(var(--pw) * .032);
  letter-spacing: .26em;
  text-indent: .26em;
  opacity: .8;
}

/* ---------- Endpapers ---------- */

.endpaper {
  background-color: #5b1746;
  background-image:
    var(--grain),
    radial-gradient(circle at 50% 50%, rgba(247, 214, 220, .32) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 50% 50%, rgba(232, 120, 159, .2) 0 5px, transparent 6px),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .35));
  background-size: 240px 240px, 22px 22px, 44px 44px, 100% 100%;
  background-position: 0 0, 0 0, 11px 11px, 0 0;
}
.endpaper.right::before,
.endpaper.left::before {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 12%;
}
.endpaper.right::before { left: 0;  background: linear-gradient(to right, rgba(0, 0, 0, .4), transparent); }
.endpaper.left::before  { right: 0; background: linear-gradient(to left,  rgba(0, 0, 0, .4), transparent); }

.bookplate {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 58%;
  transform: translate(-50%, -50%) rotate(-1.5deg);
  padding: 7% 6% 6%;
  text-align: center;
  color: var(--ink);
  background: var(--paper) var(--grain);
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  font-size: calc(var(--pw) * .04);
}
.bookplate::before {
  content: "";
  position: absolute; inset: 5%;
  border: 1px solid var(--gold);
  border-radius: 2px;
  pointer-events: none;
}
.bp-ex   { font-family: var(--fellsc); letter-spacing: .3em; color: var(--accent); font-size: .85em; }
.bp-line { margin-top: .9em; font-style: italic; color: var(--ink-soft); font-size: .9em; }
.bp-name { font-family: var(--hand); font-size: 2.1em; line-height: 1.1; color: #2d3f6b; transform: rotate(-3deg); margin-top: .1em; }

/* ---------- Title page ---------- */

.tp {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18% 10% 12%;
  font-size: calc(var(--pw) * .04);
}
.tp-vol { font-family: var(--fellsc); letter-spacing: .34em; text-indent: .34em; color: var(--accent); font-size: .9em; }
.tp-title { margin-top: 1.6em; font-family: var(--fell); line-height: 1; }
.tp-title .a { display: block; font-size: 3.3em; }
.tp-title .b { display: block; margin-top: .25em; font-style: italic; font-size: 1.45em; }
.tp .orn { margin-top: 1.8em; }
.tp-for { margin-top: 1.4em; font-style: italic; font-size: 1.15em; color: var(--ink-soft); }
.tp-by { margin-top: auto; font-family: var(--fellsc); font-size: 1.3em; letter-spacing: .06em; }
.tp-by span { font-family: var(--fell); font-style: italic; letter-spacing: 0; font-size: .8em; color: var(--ink-soft); margin-right: .2em; }

/* ---------- Contents ---------- */

.toc .pg { padding-top: calc(var(--ph) * .08); }
.toc-h {
  text-align: center;
  font-family: var(--fellsc);
  letter-spacing: .3em;
  text-indent: .3em;
  font-size: 1.05em;
  color: var(--accent);
}
.toc .orn { margin: .7em 0 1.1em; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: .4em;
  padding: .16em 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.35;
}
.toc a:hover .t { color: var(--accent); }
.toc .n { flex: none; width: 1.9em; font-family: var(--fell); color: var(--accent); font-size: .9em; }
.toc .t { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.toc .dots { flex: 1 1 1em; min-width: 1em; border-bottom: 1px dotted rgba(110, 90, 72, .55); transform: translateY(-.28em); }
.toc .f { flex: none; font-family: var(--fell); font-size: .9em; color: var(--ink-soft); }

/* ---------- The last page ---------- */

.reveal .rv {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 11% 10% 8%;
  font-size: calc(var(--pw) * .042);
}
.rv-big {
  font-family: var(--fell);
  font-style: italic;
  font-size: 2.05em;
  line-height: 1.1;
  color: var(--accent);
}
.rv-pic {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6% 0;
}
.rv-pic img {
  display: block;
  max-width: 82%;
  max-height: 100%;
  padding: 3.5% 3.5% 9%;
  background: #fffdf8;
  box-shadow: 0 6px 16px rgba(60, 35, 10, .3);
  transform: rotate(-3deg);
  object-fit: contain;
}
.rv-line { font-style: italic; line-height: 1.5; }
.rv-line.wink { font-family: var(--hand); font-style: normal; font-size: 1.6em; color: #2d3f6b; transform: rotate(-2deg); margin-top: .2em; }
.rv-end { margin-top: 1.1em; font-family: var(--fellsc); letter-spacing: .24em; text-indent: .24em; font-size: .85em; color: var(--ink-soft); }
.rv .orn { margin-top: .9em; }

/* ---------- Chrome: bar, hint, loader ---------- */

.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  height: calc(var(--barh) + env(safe-area-inset-bottom));
  padding: 0 max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 14px;
  color: #f7d6dc;
}
.nav-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(247, 214, 220, .3);
  background: rgba(255, 255, 255, .04);
  color: inherit;
  font: 26px/1 var(--serif);
  padding: 0 0 4px;
  cursor: pointer;
  transition: background .2s, border-color .2s, opacity .2s;
}
.nav-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(247, 214, 220, .6); }
.nav-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-btn:disabled { opacity: .25; cursor: default; }

.progress { flex: 1; min-width: 0; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.progress-label {
  text-align: center;
  font-family: var(--fellsc);
  font-size: 13px;
  letter-spacing: .12em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-track { height: 2px; background: rgba(247, 214, 220, .2); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: #e8789f; transform-origin: left; }

.hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--barh) + 6px);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--fellsc);
  font-size: 13px;
  letter-spacing: .2em;
  color: #f7d6dc;
  pointer-events: none;
  transition: opacity .3s;
}
.hint-arrow {
  width: 10px; height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(-3px) rotate(45deg); opacity: .5; }
  50%      { transform: translateY(3px) rotate(45deg);  opacity: 1; }
}

.loading {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center;
  background: var(--night);
  color: #f0bfd0;
  font-family: var(--fell);
  font-style: italic;
  font-size: 18px;
  transition: opacity .6s ease, visibility .6s;
}
.loading.done { opacity: 0; visibility: hidden; }

/* Off-screen copy of a content page used for pagination measurements */
.measure {
  position: absolute;
  left: -10000px;
  top: 0;
  width: var(--pw);
  height: var(--ph);
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Lock screen ---------- */

.lock {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(122, 40, 96, .55), transparent 70%),
    linear-gradient(#3a0e2d, #1e0618);
  transition: opacity .7s ease, visibility .7s;
}
.lock[hidden] { display: none; }
.lock.open { opacity: 0; visibility: hidden; }
.lock-card {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px 30px;
  color: var(--ink);
  background: var(--paper) var(--grain);
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .3);
}
.lock-card.shake { animation: shake .45s; }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.lock-seal {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a23a7c, #4a1239 70%);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .12), inset 0 0 0 6px rgba(255, 255, 255, .08), 0 3px 8px rgba(74, 18, 57, .4);
  color: #f2d9c4;
  font: italic 30px/1 var(--fell);
}
.lock-vol { margin-top: 22px; font-family: var(--fellsc); letter-spacing: .3em; text-indent: .3em; font-size: 13px; color: var(--accent); }
.lock-title { margin: 8px 0 0; font: italic 400 28px/1.15 var(--fell); }
.lock-for { margin: 12px 0 0; font-style: italic; color: var(--ink-soft); }
.lock-label { align-self: stretch; margin-top: 26px; text-align: left; font-family: var(--fellsc); font-size: 13px; letter-spacing: .16em; color: var(--ink-soft); }
.lock-input {
  align-self: stretch;
  margin-top: 6px;
  padding: 11px 12px;
  font: 18px var(--serif);
  color: var(--ink);
  background: rgba(255, 255, 255, .55);
  border: 1px solid #cdbb9c;
  border-radius: 4px;
}
.lock-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.lock-btn {
  align-self: stretch;
  margin-top: 12px;
  padding: 12px;
  font: 17px var(--fellsc);
  letter-spacing: .12em;
  color: #f6ead8;
  background: #7a2860;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.lock-btn:hover { background: #4a1239; }
.lock-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lock-btn:disabled { opacity: .6; cursor: default; }
.lock-msg { min-height: 1.5em; margin: 10px 0 0; font-style: italic; color: var(--accent); }
.lock-hint { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.lock-hint span { display: block; font-family: var(--fellsc); font-size: 12px; letter-spacing: .2em; color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .hint-arrow { animation: none; }
  .lock-card.shake { animation: none; }
}
