#found-key {
  box-sizing:border-box; width:min(21rem,calc(100% - 2rem));
  max-height:none; margin:auto; padding:0; overflow:visible;
  border:0; outline:0; background:transparent; color:var(--oak-ink);
  text-align:left; font:400 1rem/1.5 var(--type-ui);
}
#found-key[open] { display:grid; justify-items:center; }
#found-key::backdrop {
  background:rgb(48 34 40 / .30);
  animation:key-backdrop-in 480ms ease both;
}
@keyframes key-backdrop-in { from { opacity:0; } to { opacity:1; } }
#found-key .key-portrait {
  display:block; width:min(100%, 17rem, 49dvh); height:auto; margin:0 0 .2rem;
  transform-origin:0 0; pointer-events:none;
  filter:drop-shadow(1px 4px 2px rgb(56 34 27 / .20));
}
#found-key .key-paper {
  position:relative; box-sizing:border-box; width:100%;
  max-height:calc(72dvh - 1.25rem); overflow:auto;
  padding:1.2rem 1.45rem 1.3rem;
  background:var(--oak-paper); border:1px solid var(--oak-muted); border-radius:5px;
  box-shadow:0 3px 0 -1px var(--oak-paper),0 4px 0 -1px var(--oak-muted),0 10px 26px rgb(57 35 50 / .15);
}
#found-key.is-lifting .key-paper { opacity:0; pointer-events:none; }
#found-key.show-prompt .key-paper { animation:key-paper-in 180ms ease-out both; }
@keyframes key-paper-in {
  from { opacity:0; transform:translateY(3px); }
  to { opacity:1; transform:none; }
}
#found-key h2 { margin:0 1.25rem .4rem 0; font:650 clamp(1.25rem,3.4vw,1.55rem)/1.15 var(--type-ui); letter-spacing:-.025em; }
#found-key p { margin:0 0 1rem; font-size:1rem; }
#found-key form { margin:0; }
#found-key .key-close {
  position:absolute; right:.15rem; top:.15rem; width:44px; height:44px;
  display:grid; place-items:center; padding:0; background:transparent; border:0;
  color:inherit; cursor:pointer;
}
#found-key .key-close svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; }
#found-key .key-action {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px;
  padding:.48rem 1rem; border:1px solid var(--oak-ink); border-radius:3px;
  color:var(--oak-paper); background:var(--oak-ink); box-shadow:0 2px 0 var(--oak-ochre);
  font:600 .95rem/1.3 var(--type-ui); cursor:pointer;
}
#found-key button:focus-visible { outline:2px solid var(--oak-ink); outline-offset:3px; }
@media (prefers-reduced-motion:reduce) {
  #found-key::backdrop, #found-key.show-prompt .key-paper { animation:none; }
}
#keepsakes button[data-kind="discovery"] {
  width:44px; height:44px; padding:0; border:0; box-shadow:none;
  background:transparent; transform:translate(-50%,-50%);
  pointer-events:auto; cursor:pointer;
}
#keepsakes button[data-kind="discovery"] span {
  position:absolute; left:50%; bottom:100%; transform:translateX(-50%);
  padding:.16em .48em; border:1px solid var(--oak-muted); border-radius:3px;
  color:var(--oak-ink); background:var(--oak-paper); pointer-events:none;
}
@media (hover:hover) {
  #keepsakes button[data-kind="discovery"]:hover { opacity:1; }
}
