/* Only the concealed mechanism. Ordinary page typography/layout is in about.css. */
.mt-intro [hidden] { display: none !important; }
.mt-intro__photo { position: relative; }
.mt-ruler, .mt-grain-latch { position: absolute; border: 0; padding: 0; background: transparent; color: inherit; cursor: default; border-radius: 0; }
/* Rounded end of the real metal ruler: x=35%, y=36% of the uncropped photo. */
.mt-ruler { left: 35%; top: 36%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.mt-closing-words { position: relative; }
.mt-grain-latch { right: -12px; top: 50%; width: 44px; height: 44px; transform: translateY(-50%); }
.mt-ruler:hover, .mt-grain-latch:hover { cursor: pointer; }
.mt-ruler:focus-visible, .mt-grain-latch:focus-visible { outline: 2px solid #815b37; outline-offset: 1px; }
.mt-note { position: absolute; z-index: 8; width: min(285px, 100%); right: 0; top: 80%; padding: 22px 25px 22px 20px; color: #413524; background: #eee1bb; box-shadow: 0 4px 9px #30231835; transform: rotate(-2deg); border-bottom: 2px solid #d8c696; }
.mt-note p { margin: 0; font: italic 19px/1.5 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; }
.mt-note button { position: absolute; top: 0; right: 0; width: 28px; height: 28px; border: 0; background: transparent; color: #584832; font: 22px Arial,sans-serif; cursor: pointer; }
.mt-secret-items { max-width: 760px; margin: 32px auto 0; }
.mt-drawer { max-width: 330px; margin: 0 auto; padding: 18px; border: 9px solid #926843; border-bottom-width: 13px; background: repeating-linear-gradient(3deg,#bc9569 0 4px,#c09b70 5px 7px,#b99164 8px 11px); box-shadow: inset 0 3px 9px #54382145; }
.mt-answer-form { padding: 12px; background: #eee1bb; color: #413524; }
.mt-answer-form label { display: block; margin-bottom: 9px; font: italic 17px/1.5 Georgia,serif; }
.mt-answer-row { display: flex; gap: 8px; }
.mt-answer-row input { min-width: 0; width: 100%; padding: 8px; border: 1px solid #8f795b; border-radius: 0; color: #30291f; background: #fffaf0; font: 18px Arial,sans-serif; }
.mt-answer-row button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid #785b3a; background: #c8ad81; color: #30291f; font: 16px Arial,sans-serif; cursor: pointer; }
.mt-feedback { margin: 10px 0 0 !important; font: 14px/1.5 Arial,sans-serif; }
.mt-key-drawer { height: 96px; display: grid; place-items: center; background: #5f442f; box-shadow: inset 0 4px 12px #0005; animation: mt-drawer-open 320ms ease-out; }
.mt-wooden-key { display: grid; place-items: center; width: 170px; height: 75px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.mt-key-shape { position: relative; display: block; width: 115px; height: 16px; background: repeating-linear-gradient(1deg,#b98b50 0 2px,#c99c60 3px 5px); box-shadow: 0 2px 2px #0004; border-radius: 3px; transform: rotate(-8deg); }
.mt-key-shape::before { content: ""; position: absolute; width: 42px; height: 42px; left: -35px; top: -13px; border: 11px solid #b98b50; border-radius: 45%; box-shadow: inset 0 1px 3px #0004; }
.mt-key-shape::after { content: ""; position: absolute; width: 12px; height: 19px; right: 7px; top: 6px; background: #b98b50; box-shadow: -20px 0 #b98b50; }
.mt-wooden-key.is-held .mt-key-shape { transform: rotate(8deg); }
.mt-compartment { position: relative; isolation: isolate; width: min(100%,330px); height: 190px; margin: 18px auto 0; border: 10px solid #8d653e; background: #392a1e; perspective: 700px; overflow: hidden; }
.mt-door-panel { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; transform-origin: left; border: 9px solid #9d754d; background: repeating-linear-gradient(1deg,#ae8459 0 4px,#b28a60 5px 8px,#a87e53 9px 12px); box-shadow: 1px 0 4px #0005; transition: transform 420ms ease, opacity 420ms ease; }
.mt-keyhole { width: 60px; height: 64px; border: 0; background: transparent; display: grid; place-items: center; cursor: default; }
.mt-keyhole:enabled { cursor: pointer; }
.mt-keyhole span { position: relative; width: 13px; height: 13px; border-radius: 50%; background: #36291e; }
.mt-keyhole span::after { content: ""; position: absolute; width: 9px; height: 14px; top: 7px; left: 2px; background: #36291e; }
.mt-passage { position: absolute; inset: 22px 34px; display: grid; place-items: center; padding: 14px; color: #f3e6cf; font: 500 24px/1.3 "Oswald About",sans-serif; text-align: center; text-decoration: none; }
.mt-passage:hover { text-decoration: underline; }
.mt-compartment.is-open .mt-door-panel { transform: rotateY(-102deg); opacity: 0; pointer-events: none; }
.mt-door-caption { position: absolute; inset: 22px 34px; display: grid; place-items: center; color: #f3e6cf; font: 500 24px/1.3 "Oswald About",sans-serif; text-align: center; }
.mt-reward { width: 100%; max-width: 560px; margin: 28px auto 0; }
.mt-letter { padding: 26px; background: #eee1bb; color: #413524; box-shadow: 0 3px 8px #3023181a; }
.mt-letter h2 { margin: 0 0 20px; color: #413524; font: 600 23px/1.3 "Bradley Hand", "Segoe Print", Georgia, serif; }
.mt-letter p { font: 17px/1.7 Georgia,serif; }
.mt-reward .mt-passage { position: static; display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 8px 0; color: #8f1723; font: 600 18px/1.5 Arial,sans-serif; text-align: left; text-decoration: underline; text-underline-offset: 4px; }
.mt-guestbook { margin-top: 30px; }
.mt-guestbook h3 { margin: 0 0 12px; font: 600 23px/1.3 "Oswald About",sans-serif; }
.mt-guestbook p { font-size: 16px; }
.mt-guestbook .mt-optional { color: #655841; font-size: 14px; }
.mt-guestbook-form label { display: block; margin-top: 16px; margin-bottom: 6px; font-size: 15px; }
.mt-guestbook-form input, .mt-guestbook-form textarea { display: block; width: 100%; padding: 10px; border: 1px solid #998772; border-radius: 2px; color: #242424; background: #fffcf5; font: 16px/1.5 Arial,sans-serif; }
.mt-guestbook-form textarea { resize: vertical; }
.mt-guestbook-form button { min-height: 44px; margin-top: 16px; padding: 10px 18px; border: 0; border-radius: 2px; background: #b31c2b; color: #fff; font: 600 16px/1.5 Arial,sans-serif; cursor: pointer; }
.mt-guestbook-form button:disabled { opacity: .65; cursor: wait; }
.mt-guestbook-feedback { margin-top: 16px !important; }
@media (max-width: 400px) { .mt-letter { padding: 20px; } }
.mt-replay { display: block; margin: 16px auto 0; padding: 8px; min-height: 44px; border: 0; background: transparent; color: #655841; font: 13px Arial,sans-serif; text-decoration: underline; cursor: pointer; }
.mt-demo-mode { position: fixed; z-index: 30; right: 6px; bottom: 6px; padding: 4px 8px; color: #fff; background: #333; font: 11px/1.4 Arial,sans-serif; }
@keyframes mt-drawer-open { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mt-key-drawer { animation: none; } .mt-door-panel { transition: none; } }
@media print { .mt-ruler, .mt-grain-latch, .mt-note, .mt-secret-items, .mt-demo-mode { display: none !important; } }
