/* A quiet antique study: photographic surroundings, live mechanical controls. */
body{background:#211b13;color:#f2e6ca;isolation:isolate;position:relative;min-height:100dvh}
body:before{content:'';position:fixed;inset:0;z-index:-2;background:linear-gradient(180deg,#100e0b70 0%,#16120b25 32%,#180d0735 66%,#0c0807ab 100%),url('assets/antique-study.webp') center 46%/cover no-repeat;pointer-events:none}
body:after{content:'';position:fixed;inset:0;z-index:-1;background:radial-gradient(ellipse at 15% 0%,#e5c37e24,transparent 56%),radial-gradient(ellipse at center,transparent 40%,#06060355);pointer-events:none}
header{max-width:1440px;margin:auto;height:100px;position:relative;z-index:12}
.brand{color:#e4cfa2;text-shadow:0 2px 8px #0008}.monogram{color:#e9d5a8;border-color:#c0a06488;background:#15191238;box-shadow:inset 0 0 0 3px #30291b55,0 4px 15px #0003}
nav{padding:2px 13px;background:#1619125c;border:1px solid #be9b5e55;box-shadow:0 3px 15px #0003;backdrop-filter:blur(6px);border-radius:3px}
nav button{color:#e7d3aa;opacity:.65}nav button.selected{color:#fff0ce;border-color:#d2b06d}nav i{border-color:#c9ab7355}
.intro{margin-top:5px;text-shadow:0 2px 15px #0009}.eyebrow{color:#d7b97c;letter-spacing:4.5px}#title{color:#fff1d3;font-size:clamp(42px,5vw,67px);text-shadow:0 2px 2px #27190b,0 4px 32px #0006}.flourish{color:#c2a064;margin-top:14px}.flourish span{background:linear-gradient(90deg,transparent,#b49b65)}#subtitle{color:#e2ceb0;font-size:19px}
.machine-scene{margin-top:33px;filter:drop-shadow(0 17px 20px #0003)}
.paper{color:#403728;background-color:#f5ead3;background-image:linear-gradient(90deg,#ad85432b,transparent 12%,transparent 86%,#be9b5630),url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.065' filter='url(%23n)'/%3E%3C/svg%3E"),linear-gradient(120deg,#f1e4c8,#fff9e9 55%,#e7d8b7);border:1px solid #d7c49c;box-shadow:1px 0 0 #9e8961,3px 3px 0 #d7c39a,0 6px 18px #0006,inset 0 0 22px #b5944330;transform:none}
.paper:before{content:'';position:absolute;inset:8px 9px 13px;border:1px solid #af945e5c;pointer-events:none}.paper:after{content:'❧';position:absolute;bottom:17px;left:50%;transform:translateX(-50%);font:23px Georgia;color:#b49b65;opacity:.7;pointer-events:none}.paper-top{color:#a78542}.paper #featured{color:#3c3b2c;text-shadow:0 1px #fff7}.paper #paper-label{color:#8d754c}.paper #paper-translation{color:#937b54}.paper #paper-verse{color:#786647}.paper small{color:#987b47}.paper-rule{border-color:#b49a65}
.machine{filter:drop-shadow(0 15px 9px #090c07bd)}.machine-top{box-shadow:inset 0 2px 1px #d2d5a1a6,inset 0 -6px 8px #05160a99,0 1px 0 #c1aa66}.key{color:#302b21}.key.active,.key:active{color:#533b16}.machine-shadow{height:35px;bottom:-13px;background:radial-gradient(ellipse,#050804d9,transparent 71%);filter:blur(9px)}
.under-machine{margin-top:15px;margin-bottom:28px;position:relative;z-index:1}#instruction{color:#f0dfbb;font-size:16px;text-shadow:0 2px 8px #000}#instruction span{color:#e2c68a}#browse{color:#e9d3a4;border:1px solid #c3a16788;background:linear-gradient(#372c1ac9,#171c13cf);padding:10px 19px;font-size:11px;box-shadow:inset 0 0 0 3px #a2894c11,0 3px 12px #0004;transition:background .2s,box-shadow .2s}#browse:hover{background:#4f442bd9;box-shadow:0 0 15px #c6a46833}#browse span{color:#d8b97c}
footer{color:#c5b18a;border-color:#c3a46c44;text-shadow:0 1px 6px #000;position:relative;z-index:1}footer button{color:#e0cba2}.footer-ornament{color:#c7aa6d}
/* The index emerges from the sheet, with a brass letter tab. */
.word-menu{top:135px;width:300px;color:#3e3528;background-color:#f8efdc;background-image:linear-gradient(90deg,#b6944a19,transparent 12%,transparent 89%,#b6944a19);border:1px solid #c6ab73;box-shadow:0 20px 45px #06080599,0 0 0 3px #d2bd8e,0 0 0 4px #7e663e;animation:none}
.word-menu:before{content:'';position:absolute;top:6px;left:6px;right:6px;bottom:6px;border:1px solid #b3996040;pointer-events:none}.word-menu:after{content:'';position:absolute;top:-9px;right:21px;width:25px;height:13px;border:1px solid #b6a073;border-bottom:0;border-radius:13px 13px 0 0;background:linear-gradient(90deg,#846b38,#e0cb96,#90733e);pointer-events:none}.menu-heading{padding:9px 14px;background:linear-gradient(90deg,#e3d1aa66,transparent);border-color:#b59b6566}.menu-heading>span{display:flex;align-items:center;justify-content:center;width:36px;height:37px;font:29px var(--display);color:#7f6130;border:1px solid #baa16c66;background:#fff9eb99}.menu-heading p{color:#8a7043}.menu-heading button{color:#7c6742;width:31px;height:31px}#menu-items{max-height:min(180px,32dvh);scrollbar-color:#b59a64 #eadcc2}.word-choice{position:relative;color:#483b28;min-height:40px;padding:8px 17px}.word-choice:before{content:'·';color:#ac8b4d;margin-right:1px}.word-choice>span{flex:1}.word-choice:hover,.word-choice.chosen{background:linear-gradient(90deg,#ceb57c99,#ead9ad88);color:#624119}.word-choice small{color:#a08656}.no-results{color:#8e7856}
/* An ivory folio on the desk, with an illuminated margin. */
.reader{color:#302e28;padding:30px 25px;background:#100e0bdd;backdrop-filter:blur(8px);perspective:1600px;opacity:1;transition:opacity .2s}
.frame{padding:44px 65px;background-color:#f8f0df;background-image:linear-gradient(90deg,#af925039 0%,transparent 5%,transparent 95%,#b8954c29),url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.045' filter='url(%23n)'/%3E%3C/svg%3E"),linear-gradient(120deg,#fbf6e9,#f7edda);border-radius:2px;box-shadow:0 0 0 1px #9b7c45,0 0 0 5px #d9c99f,0 0 0 6px #ad8d51,5px 5px 0 7px #c2b28d,6px 6px 0 8px #72603d,inset 0 0 0 7px #f7eedb,inset 0 0 0 8px #bba16d,0 20px 65px #0009;animation:folio-open .38s cubic-bezier(.2,.7,.2,1);transform-origin:10% 15%;min-height:calc(100dvh - 60px)}
.frame:before,.frame:after{content:'❦';color:#a18447;background:#f7edd9;padding:0 20px;font-size:30px}.corner{font-size:46px;color:#9f8146;text-shadow:0 1px #fff;filter:drop-shadow(0 1px #c9b37b66)}.tl,.tr{top:10px}.bl,.br{bottom:10px}.tl,.bl{left:11px}.tr,.br{right:11px}
.reader-bar{border-color:#cbb586;font-size:9px;position:relative;color:#8f7950}.reader-bar button{border:1px solid #ad925c55;padding:7px 10px;background:#d4c29322;color:#6f5a37}.reader-bar button:hover{background:#d8c08a44}.reader-bar:after{content:'';position:absolute;right:25px;top:-44px;width:19px;height:32px;background:linear-gradient(90deg,#283d2b,#567052 50%,#263e2b);clip-path:polygon(0 0,100% 0,100% 100%,50% 77%,0 100%);box-shadow:0 2px 3px #0003;pointer-events:none}
.entry-heading{position:relative;padding:4px 0 21px;border-bottom:1px solid #d3bd8a66}.entry-heading:after{content:'❧';position:absolute;bottom:-12px;left:50%;transform:translateX(-50%);padding:0 15px;background:#f8efde;font-size:23px;color:#a98b4e}.entry-heading h2{color:#3d4934;text-shadow:0 1px #fff;letter-spacing:.5px}.entry-heading .entry-number{color:#a08042}.entry-initial{color:#8b6838;font-size:1.12em}.first-quote{border-color:#b08c4b;background:linear-gradient(90deg,#e5d6b33b,transparent);padding:10px 0 10px 16px}.first-quote:first-letter{font-size:1.5em;color:#8f6a32}.origin-group h4{color:#7a643e}.entry-section h3{color:#987237}.scripture{border-left-color:#c0a369}.entry-links{border-color:#cbb586}.tap-hint{color:#a28e66}
.reader.is-closing{opacity:0}.reader.is-closing .frame{animation:folio-close .2s ease-in both}
.machine-scene.striking .paper{animation:paper-tick .22s ease-out}.machine-scene.striking .type-guide{animation:type-strike .22s ease-out}.machine-scene.striking .carriage{animation:carriage-tick .22s ease-out}.paper.letter-mode #featured{font-family:var(--display);font-size:48px;font-weight:400;letter-spacing:2px;animation:ink-print .24s ease-out}.paper.letter-mode #paper-translation{opacity:.75}
@keyframes folio-open{from{opacity:0;transform:translateY(18px) rotateY(-7deg) scale(.97)}to{opacity:1;transform:translateY(0) rotateY(0) scale(1)}}
@keyframes folio-close{to{opacity:0;transform:translateY(12px) rotateY(5deg) scale(.985)}}
@keyframes index-unfold{from{opacity:0;transform:translateX(-50%) translateY(14px) scaleY(.85)}to{opacity:1;transform:translateX(-50%) translateY(0) scaleY(1)}}
@keyframes paper-tick{0%,100%{transform:translateY(0)}40%{transform:translateY(-2px)}}
@keyframes type-strike{0%,100%{transform:rotateX(0)}35%{transform:translateY(-13px) rotateX(-35deg)}}
@keyframes carriage-tick{0%,100%{transform:translateX(0)}40%{transform:translateX(-3px)}}
@keyframes ink-print{from{opacity:.2;filter:blur(2px)}to{opacity:1;filter:blur(0)}}
@media(min-width:1000px){body:before{background-position:center 48%}.intro{margin-top:0}.machine-scene{margin-top:31px}header{height:95px}.under-machine{margin-top:17px}}
@media(max-width:650px){header{height:78px;padding:18px 6%}nav{padding:1px 9px;gap:9px}.intro{margin-top:21px}.eyebrow{font-size:8px;letter-spacing:2.5px}#title{font-size:43px}#subtitle{font-size:16px}.machine-scene{margin-top:31px}body:before{background-position:center 48%;background-image:linear-gradient(180deg,#100e0b88,#16120b22 40%,#180d071f 65%,#0c0807b3),url('assets/antique-study.webp')}.paper:before{inset:7px}.paper:after{font-size:18px;bottom:17px}.paper #paper-verse{font-size:12px}.paper.letter-mode #featured{font-size:40px}.under-machine{margin-top:23px;margin-bottom:26px}#instruction{font-size:14px}#browse{font-size:10px;padding:9px 15px}footer{margin:0 6%;padding:18px 0}.word-menu{top:120px;width:285px}.menu-heading p{font-size:8px;letter-spacing:1px}.reader{padding:19px 14px}.frame{padding:35px 23px;min-height:calc(100dvh - 38px);box-shadow:0 0 0 1px #9b7c45,0 0 0 4px #d9c99f,0 0 0 5px #ad8d51,3px 3px 0 6px #c2b28d,inset 0 0 0 6px #f7eedb,inset 0 0 0 7px #bba16d,0 20px 50px #0009}.corner{font-size:32px}.tl,.tr{top:9px}.bl,.br{bottom:9px}.tl,.bl{left:8px}.tr,.br{right:8px}.frame:before,.frame:after{font-size:25px}.reader-bar{font-size:8px;gap:8px}.reader-bar button{font-size:11px;padding:6px 7px}.reader-bar:after{top:-35px;right:15px;width:15px;height:25px}.entry-heading{padding-bottom:20px}.first-quote{padding-left:12px}.first-quote:first-letter{font-size:1.35em}}
@media(max-width:360px){#title{font-size:38px}nav{gap:6px;padding:1px 6px}#subtitle{font-size:15px}.word-menu{width:267px}}
@media(prefers-reduced-motion:reduce){.machine-scene.striking .paper,.machine-scene.striking .type-guide,.machine-scene.striking .carriage,.paper.letter-mode #featured,.word-menu,.frame,.reader.is-closing .frame{animation:none!important}.reader{transition:none}.reader.is-closing .frame{opacity:0}}

/* The index gently rises from the paper; its rows appear in sequence. */
.word-menu.menu-rising{animation:menu-lift-reveal .78s cubic-bezier(.22,.62,.25,1) both;transform-origin:50% 100%}
.word-menu.menu-rising .word-choice,.word-menu.menu-rising .no-results{animation:index-row-arrive .35s ease-out both;animation-delay:var(--reveal-delay,180ms)}
@keyframes menu-lift-reveal{
 0%{opacity:0;transform:translateX(-50%) translateY(100%)}
 18%{opacity:1;transform:translateX(-50%) translateY(78%)}
 48%{opacity:1;transform:translateX(-50%) translateY(39%)}
 80%{opacity:1;transform:translateX(-50%) translateY(7%)}
 100%{opacity:1;transform:translateX(-50%) translateY(0)}
}
@keyframes index-row-arrive{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.word-menu.menu-rising,.word-menu.menu-rising .word-choice,.word-menu.menu-rising .no-results{animation:none!important;clip-path:none;transform:none}.word-menu.menu-rising{transform:translateX(-50%)}}
/* Flattened archival paper: fine creases remain behind the text. */
.frame{background-color:#f9efd9;background-image:linear-gradient(90deg,#8f6d3529,transparent 6%,transparent 94%,#8f6d3523),linear-gradient(#fffbee80,#fffbee80),url('assets/aged-folded-paper.webp');background-size:auto,auto,100% auto;background-repeat:repeat,repeat,repeat-y;animation:folio-rise-unfold .95s cubic-bezier(.22,.62,.25,1) both;transform-origin:50% 100%}
.paper{background-image:linear-gradient(90deg,#ad85432b,transparent 12%,transparent 86%,#be9b562b),linear-gradient(#fff9e990,#fff9e990),url('assets/aged-folded-paper.webp');background-size:auto,auto,100% auto;background-repeat:no-repeat}
.reader:not(.is-closing) #entry-content{animation:folio-ink-arrive .48s .2s ease-out both}
@keyframes folio-rise-unfold{
 0%{opacity:0;transform:translateY(82px);clip-path:inset(0 -40px calc(100% - 30px) -40px)}
 22%{opacity:1;transform:translateY(61px);clip-path:inset(-15px -40px calc(100% - 26dvh) -40px)}
 55%{opacity:1;transform:translateY(25px);clip-path:inset(-25px -50px calc(100% - 64dvh) -50px)}
 85%{opacity:1;transform:translateY(4px);clip-path:inset(-30px -60px calc(100% - 110dvh) -60px)}
 100%{opacity:1;transform:translateY(0);clip-path:inset(-30px -60px -80px -60px)}
}
@keyframes folio-ink-arrive{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.frame,.reader:not(.is-closing) #entry-content{animation:none!important;clip-path:none;transform:none}}

/* Paper-feed aperture: clip the moving card at the roller, above every key. */
.menu-slot{position:absolute;left:0;right:0;top:0;height:196px;z-index:10;pointer-events:none;clip-path:inset(-100vh -100vw 0 -100vw)}
.menu-slot .word-menu{top:auto;bottom:0;pointer-events:auto;transform:translateX(-50%);clip-path:none;box-shadow:0 0 0 3px #d2bd8e,0 0 0 4px #7e663e,0 -9px 24px #06080566}
@media(max-width:650px){.menu-slot{height:184px}}
/* Reserve the paper's lines so typing never shifts the sheet or carriage. */
.paper #paper-label{min-height:10px}.paper #featured{display:block;min-height:51px;margin:0 auto}.paper #paper-translation{min-height:15px}.paper #paper-verse{min-height:33px}.paper #paper-ref{display:block;min-height:10px}
.paper .typing-line:after{content:'';display:inline-block;height:.9em;margin-left:2px;border-right:1px solid #725834;vertical-align:-.05em;animation:typing-caret .7s steps(1,end) infinite}
@keyframes typing-caret{0%,55%{opacity:1}56%,100%{opacity:0}}
@media(max-width:650px){.paper #featured{min-height:43px}.paper #paper-verse{min-height:31px}}
@media(prefers-reduced-motion:reduce){.paper .typing-line:after{display:none}}
/* Compact homepage; keep the separate reading folio at its chosen text size. */
header{height:78px;padding-top:18px;padding-bottom:18px}
#home .intro{margin-top:0}#home .eyebrow{margin-bottom:11px}#home #title{font-size:clamp(38px,4.6vw,58px)}#home .flourish{margin-top:10px;margin-bottom:7px}#home #subtitle{font-size:17px}
#home .machine-scene{margin-top:23px;transform:scale(.92);transform-origin:center top;margin-bottom:-37px}
#home .under-machine{margin-top:11px;margin-bottom:20px}#home footer{padding:16px 0}
@media(max-width:650px){
 header{height:59px;padding:11px 6%}.brand .monogram{font-size:23px}nav{padding-top:0;padding-bottom:0}
 #home .intro{margin-top:7px}#home .eyebrow{font-size:8px;letter-spacing:2px;margin-bottom:10px}#home #title{font-size:36px;line-height:1.12;letter-spacing:-.5px}html[lang=zh] #home #title{font-size:34px;letter-spacing:5px}html[lang=es] #home #title{font-size:33px}
 #home .flourish{margin-top:9px;margin-bottom:6px;font-size:15px}#home #subtitle{font-size:14px;line-height:1.4}
 #home .machine-scene{margin-top:20px;transform:scale(.88);margin-bottom:-44px}
 #home .under-machine{margin-top:15px;margin-bottom:17px}#home #instruction{font-size:13px;margin-bottom:10px}#home #browse{font-size:10px;padding:8px 14px}
 #home footer{padding:13px 0;font-size:7px}#home footer button{font-size:9px}
}
@media(max-width:650px) and (max-height:740px){
 header{height:55px}#home .intro{margin-top:3px}#home .machine-scene{margin-top:17px;transform:scale(.82);margin-bottom:-67px}#home .under-machine{margin-top:12px;margin-bottom:13px}#home footer{padding:11px 0}
}
@media(max-width:650px) and (max-height:650px){
 header{height:49px;padding-top:8px;padding-bottom:8px}#home .eyebrow{margin-bottom:7px}#home #title{font-size:32px}html[lang=zh] #home #title{font-size:30px}html[lang=es] #home #title{font-size:29px}#home .flourish{margin-top:6px;margin-bottom:4px}#home #subtitle{font-size:13px}#home .machine-scene{margin-top:14px;transform:scale(.76);margin-bottom:-89px}#home .under-machine{margin-top:9px;margin-bottom:10px}#home footer{padding:9px 0}
}
@media(min-width:651px) and (max-height:780px){
 header{height:64px}#home #title{font-size:46px}#home .eyebrow{margin-bottom:7px}#home .flourish{margin-top:7px;margin-bottom:4px}#home .machine-scene{margin-top:16px;transform:scale(.84);margin-bottom:-74px}#home .under-machine{margin-top:9px;margin-bottom:12px}#home footer{padding:12px 0}
}
.lemma-audit{padding-top:7px;border-top:1px dotted #c6ae7e88;margin-top:10px!important}
#home footer #guide-link{color:#e0cba2;text-decoration:none;font:10px Georgia;letter-spacing:.5px;border-bottom:1px solid #bc9e6055;padding:3px 0}#home footer #guide-link:hover{color:#fff0ce}
.guide-section{padding:22px 0;border-bottom:1px solid #cdb78966}.guide-section:last-child{border-bottom:0}.guide-section h3{font:600 18px var(--hei);color:#6d5635;margin:0 0 13px}.guide-content p,.guide-content li{font:18px/1.8 var(--song);color:#393329}.guide-content p{margin:10px 0}.guide-content ol{padding-left:24px;margin:10px 0}.guide-content li{padding:2px 0 6px 3px}.guide-content strong{font-family:var(--hei);font-weight:600}.guide-sources{border:1px solid #af945e88;background:#dfcfaa33;color:#7f6538;padding:8px 12px;font:14px var(--song)}
@media(max-width:650px){#home footer #guide-link{font-size:9px}.guide-heading h2{font-size:32px}.guide-section{padding:18px 0}.guide-section h3{font-size:16px}.guide-content p,.guide-content li{font-size:16px;line-height:1.85}html[lang=zh] .guide-content p,html[lang=zh] .guide-content li{font-size:15px}}


.contact-address{font-family:var(--song);color:#493b24;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}

.related-site{display:inline-block;min-height:44px;padding:8px 0;color:#5d4825;text-decoration:underline;text-underline-offset:4px;font-family:var(--song)}.related-site:hover{color:#304b34}.related-site:focus-visible{outline:2px solid #846231;outline-offset:4px}

.related-app{position:relative;margin:16px 0}.related-open{display:block;min-height:46px;padding:10px 16px;background:#3d4c36;color:#fff4d7;border:1px solid #7c704b;border-radius:3px;font:17px/1.5 var(--song);cursor:pointer;touch-action:manipulation}.related-address{display:block;margin-top:6px;padding:5px 0;color:#66502c;font:12px/1.7 var(--song);text-decoration:underline;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}.related-open:focus-visible{outline:3px solid #b08b4b;outline-offset:3px}

.related-open{width:fit-content;max-width:100%;text-decoration:none}.related-open:hover{background:#4b603f;color:#fff4d7}

.contact-mail{display:inline-block;min-height:44px;padding:7px 0;color:#5d4825;text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere}.contact-mail:focus-visible{outline:2px solid #846231;outline-offset:3px}

.background-item{margin:16px 0 23px}.background-item+.background-item{padding-top:14px;border-top:1px solid #d8c7a580}.background-item .sense-meaning{margin-bottom:7px}
