:root{color-scheme:dark;--ink:#f9eacf;--muted:#cbb697;--gold:#e8b85e;--line:#795635}*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{color:var(--ink);font:15px/1.5 system-ui,sans-serif;background:radial-gradient(ellipse at 50% 20%,#593b25,transparent 65%),repeating-linear-gradient(2deg,#201912 0 3px,#241b13 4px 5px)}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.45;cursor:default}button:focus-visible{outline:3px solid #f1c667;outline-offset:3px}.alchemy-app{height:var(--pech-viewport-height,100dvh);max-width:1020px;padding:30px 24px 70px;margin:auto;display:flex;flex-direction:column;gap:18px}header{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-shrink:0}h1{font:52px/1 Georgia,serif;margin:9px 0}header p{font-size:13px;color:var(--muted);margin:0}.eyebrow{text-transform:uppercase;letter-spacing:.15em;font-size:9px;color:var(--gold);font-weight:700}.book-button{display:flex;gap:12px;align-items:center;background:#4c3020;border:1px solid #956b3f;border-radius:7px;padding:12px 15px;color:var(--ink);text-align:left;box-shadow:0 7px 18px #0005;font-size:13px;flex-shrink:0}.book-button small{display:block;font-size:11px;color:var(--gold);margin-top:3px}.mini-book{display:grid;place-items:center;width:40px;height:47px;border:3px solid #754827;border-right:5px double #ead5ac;border-radius:4px 7px 7px 4px;background:#623726;box-shadow:inset 0 0 0 1px #bd8752;color:#efd18e;font-size:24px}.workbench{min-height:0;flex:1;display:flex;flex-direction:column;gap:20px;padding:25px 30px;background:linear-gradient(90deg,#170d0755,transparent 25% 75%,#170d0755),repeating-linear-gradient(0deg,#684326 0 2px,#553821 3px 6px,#604027 7px 9px);border:7px ridge #825933;border-radius:16px;box-shadow:inset 0 0 65px #20100880,0 18px 35px #0005}.lab-heading{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#f0d7b4;letter-spacing:.03em}.lab-heading span:last-child{opacity:.65}.ingredients{display:grid;grid-template-columns:1fr 54px 1fr;align-items:center;flex:1;min-height:0;max-height:350px}.ingredient{height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:2px dashed #af8955;border-radius:50% 50% 14px 14px;background:radial-gradient(ellipse,#47301ee0,#20160fea);color:#f6ddba;padding:12px;box-shadow:inset 0 0 25px #0007}.ingredient.filled{border-style:solid;border-color:#e4b76a}.ingredient small{font-size:10px;color:var(--muted)}.ingredient strong{font:22px Georgia,serif}.empty-mark{font:56px/1 Georgia,serif;color:#bd9867}.ingredient .alchemy-icon{width:min(150px,80%);height:auto;aspect-ratio:1;border-radius:14px;box-shadow:0 6px 20px #0006}.plus{font:42px Georgia,serif;text-align:center;color:#f0c173}.alchemy-icon{display:inline-block;width:64px;height:64px;flex-shrink:0;background-image:url('alchemy-atlas.png');background-size:600% 400%;background-repeat:no-repeat;border-radius:9px}.controls{display:flex;gap:10px;justify-content:center;flex-shrink:0}.primary,.secondary{border:1px solid #b88845;border-radius:7px;padding:12px 20px;min-height:45px;background:linear-gradient(#f3c877,#d49542);color:#34200b;font-weight:800;font-size:13px}.secondary{background:#32251a;color:#ead6b4;border-color:#967348}.result{flex-shrink:0;min-height:90px;padding:16px 18px;background:#221810e8;border:1px solid #8e653d;border-radius:7px;border-left:4px solid var(--gold);font-size:13px;line-height:1.55}.result strong{display:flex;gap:10px;align-items:center;color:#f9d28a}.result p{margin:5px 0 0;color:#e0caac}.result.success{border-left-color:#b8c984}.result .alchemy-icon{width:42px;height:42px}.footnote{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted);flex-shrink:0}.text-button{background:none;border:0;color:var(--muted);text-decoration:underline;font-size:11px;padding:0}
dialog{position:fixed;inset:0;margin:auto;border:1px solid #ad8753;border-radius:13px;background:#2c2017;color:var(--ink);width:min(800px,calc(100% - 24px));max-height:calc(100dvh - 30px);padding:22px;box-shadow:0 20px 100px #000b;overflow:auto}dialog::backdrop{background:#160e09d9;backdrop-filter:blur(5px)}.picker-head,.book-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.picker-head h2{font:28px Georgia,serif;margin:5px 0}.close{width:39px;height:39px;flex-shrink:0;border:1px solid #a1835f;border-radius:50%;background:#e9d7b5;color:#4e3422;font-size:26px;line-height:1}.picker-note{font-size:12px;color:var(--muted);margin:8px 0 18px}.item-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.item{min-width:0;padding:8px 5px;background:#442e1e;border:1px solid #987141;border-radius:7px;display:flex;align-items:center;flex-direction:column;gap:7px;color:#f2e2c9;font-size:11px;line-height:1.25;text-align:center}.item .alchemy-icon{width:100%;height:auto;aspect-ratio:1}.item:hover{border-color:#f2c976;background:#5a3a21}.item[aria-pressed=true]{outline:2px solid var(--gold)}
#book{width:min(950px,calc(100% - 20px));padding:0;background:#573421;color:#493524;border:6px solid #6a432c;max-height:calc(100dvh - 24px)}.book-cover{padding:6px;background:linear-gradient(90deg,#5e3521,#ad8250 2%,#754a2c 98%,#4e2a1c)}.book-paper{padding:22px 26px 15px;background:linear-gradient(90deg,#cbb991 0,#eee0bd 3%,#f9efd4 48%,#e4d3b0 100%);border-radius:3px;box-shadow:inset 8px 0 11px #6f4e3c4a}.book-heading{border-bottom:2px solid #a08a66;padding-bottom:12px}.book-heading h2{font:33px Georgia,serif;margin:3px 0 0}.book-heading .eyebrow{color:#92703e}.book-entry{display:flex;align-items:flex-start;gap:14px;padding:13px 0;border-bottom:1px solid #b8a27c;break-inside:avoid}.book-entry .alchemy-icon{width:66px;height:66px;margin-top:3px;box-shadow:0 3px 10px #5e372924}.book-entry.locked .alchemy-icon{filter:grayscale(.9);opacity:.45}.book-entry-text{flex:1;min-width:0;background:repeating-linear-gradient(transparent 0 25px,#b5a17d44 25px 26px);font:14px/26px Georgia,serif}.book-entry h3{font:700 15px/26px Georgia,serif;margin:0;color:#583b24}.book-entry p{margin:0}.entry-hint{border:1px solid #b7a078;border-radius:4px;padding:4px 8px;background:#ebdbb6;color:#674e2d;font-size:11px;min-height:32px}.hint-text{color:#784b21;font-size:12px;line-height:1.65;padding:6px 0}.book-pagination{display:flex;justify-content:space-between;align-items:center;margin-top:16px;font:italic 12px Georgia,serif;color:#816c4c}.book-pagination button{background:#e3cea3;border:1px solid #ae946a;border-radius:4px;min-width:44px;min-height:35px;color:#594225}.reset-card h2{font:25px Georgia,serif;margin-top:0}.reset-card p{font-size:13px}.reset-card button{margin-top:8px}
@media(max-width:650px){.alchemy-app{padding:16px 12px 68px;gap:12px}h1{font-size:34px;margin:7px 0}header p{font-size:11px}.eyebrow{font-size:7px;letter-spacing:.09em}.book-button{padding:9px;gap:7px;font-size:10px}.mini-book{width:29px;height:36px;font-size:19px}.book-button small{font-size:10px}.workbench{padding:15px 12px;border-width:5px;gap:14px}.lab-heading{font-size:10px}.lab-heading span:last-child{display:none}.ingredients{grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);max-height:none;min-height:140px}.ingredient{padding:10px 7px;border-radius:48% 48% 10px 10px}.ingredient strong{font-size:17px}.ingredient small{font-size:9px}.ingredient .alchemy-icon{width:min(120px,90%)}.plus{font-size:28px}.empty-mark{font-size:45px}.primary,.secondary{font-size:12px;padding:10px 12px;min-height:42px}.result{padding:12px;font-size:12px;min-height:95px}.footnote{font-size:9px;line-height:1.3}.text-button{font-size:9px}.item-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.item{font-size:10px;padding:5px;gap:5px}.picker-head h2{font-size:22px}.picker-note{font-size:11px}.close{width:34px;height:34px}dialog{padding:15px}.book-paper{padding:16px 14px 12px}.book-heading h2{font-size:26px}.book-entry{gap:10px;padding:11px 0}.book-entry .alchemy-icon{width:54px;height:54px}.book-entry-text{font-size:12px;line-height:23px;background-size:auto}.book-entry h3{font-size:14px;line-height:23px}.hint-text{font-size:11px}.entry-hint{font-size:10px}.book-pagination{margin-top:10px}}
@media(max-height:660px){.alchemy-app{padding-top:9px;gap:8px}h1{font-size:29px}.workbench{gap:10px;padding:12px}.ingredients{min-height:100px}.result{min-height:72px;font-size:11px}.ingredient .alchemy-icon{width:80px}.footnote{display:none}header p{max-width:185px}.lab-heading{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
