@media (max-width:760px) {
 html { overflow-x:clip; scrollbar-width:none; }
 html::-webkit-scrollbar { display:none; }
 body { width:100%; overflow-x:clip; }
 .magic-hero { min-height:0; }
 .potions-section { padding:32px 14px 40px; }
 .potions-heading,.spells-heading,.artifacts-heading { gap:12px; transform:none; margin-bottom:28px; }
 .potions-heading span,.spells-heading span,.artifacts-heading span { width:auto; flex:1; }
 .potions-heading h2,.spells-heading h2,.artifacts-heading h2 { font-size:25px; letter-spacing:2px; }
 .potions-grid,.spells-grid,.hidden-spells { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; }
 .potion-card { height:auto; min-width:0; padding-bottom:4px; }
 .potion-bottle { width:100%; height:230px; }
 .potion-bottle::before { width:100%; height:180px; }
 .potion-info { width:100%; }
 .potion-info h3 { font-size:16px; line-height:1.35; letter-spacing:.3px; min-height:3.9em; margin:6px 0; }
 .potion-stars { font-size:14px; }
 .potion-card:hover { transform:none; }
 .potions-more { display:inline-block; margin-top:20px; }
 .magic-flow { margin:10px 14px 40px; padding:26px 16px; flex-direction:column; gap:28px; border:1px solid #d8b26e44; }
 .magic-flow::after { display:none; }
 .magic-flow-text { width:100%; text-align:center; }
 .magic-flow-text h2 { font-size:23px; line-height:1.4; letter-spacing:1px; }
 .magic-flow-steps { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 12px; }
 .magic-step:not(:last-child)::after { display:none; }
 .magic-step-icon { width:88px; height:88px; margin-bottom:12px; }
 .magic-step-icon img { max-width:100%; max-height:100%; }
 .magic-step h3 { font-size:15px; letter-spacing:.5px; }
 .magic-step p { font-size:14px; line-height:1.6; }
 .spells-section { margin:36px 14px; }
 .spell-card { width:100%; height:310px; box-sizing:border-box; }
 .spell-name { flex-basis:88px; padding:18px 14px 0; font-size:13px; letter-spacing:.5px; }
 .artifacts-section { grid-template-columns:1fr; margin:48px 0 24px; padding:0 16px; gap:36px; }
 .artifacts-track { gap:10px; min-width:0; }
 .artifact-card { min-width:0; }
 .artifact-image { height:120px; }
 .artifact-question { font-size:76px; }
 .artifact-card h3 { font-size:13px; letter-spacing:.5px; }
 .artifact-card p { font-size:13px; }
 .artifact-prev { left:-14px; }
 .artifact-next { right:-14px; }
 .magic-nature { padding:24px 16px; }
 .signature-name { font-size:29px; }
 .signature-line { width:30px; }
 .nav-link.active::before,.nav-link.active::after { display:none; }
}

/* Readable single-column recipe scroll for phones. */
@media (max-width:760px) {
 .potion-dialog { width:calc(100vw - 40px); max-width:440px; height:76dvh; max-height:680px; padding:0; overflow:visible; }
 .potion-dialog::backdrop { background:rgba(2,7,14,.42); }
 .potion-book {
  width:100%; height:100%; aspect-ratio:auto; perspective:none;
  background:url('../Elderwoods/images/backgrounds/profile-scroll.png') center / 100% 100% no-repeat;
  clip-path:polygon(3% 4%,14% 4.5%,50% 5%,94% 3.5%,98% 5%,99% 12%,95% 14%,95% 21%,92% 24%,96% 28%,94% 35%,96% 42%,93% 48%,96% 54%,94% 62%,96% 70%,94% 78%,95% 85%,98% 87%,99% 95%,94% 96%,50% 95%,6% 96%,1% 94%,2% 87%,6% 85%,5% 80%,6% 74%,4% 68%,6% 62%,4% 56%,6% 49%,4% 43%,6% 36%,4% 30%,6% 24%,5% 16%,2% 13%,1% 7%);
 }
 .potion-book-background,.potion-book-cover { display:none; }
 .potion-book-content,.is-opening .potion-book-content {
  position:absolute; inset:15% 0; width:100%; padding:10px 12% 24px;box-sizing:border-box;
  font:italic 15px/1.5 Georgia,serif; color:#392719;
  overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none;
  opacity:1; animation:none; transform:none;
 }
 .potion-book-content::-webkit-scrollbar { display:none; }
 .potion-book-content > * { position:relative; inset:auto; width:100%; height:auto; max-width:100%; overflow:visible; margin:0 0 16px; font-size:15px; line-height:1.5; }
 .potion-book-content .potion-book-image { display:block; height:150px; width:100%; object-fit:contain; margin:0 0 12px; }
 #potion-book-title { position:relative; inset:auto; width:100%; height:auto; display:block; margin:0 0 24px; padding:12px 0; border-top:3px double #76502b; border-bottom:3px double #76502b; font-size:24px; font-weight:400; line-height:1.3; text-align:center; }
 .potion-book-level::before { content:'Level: '; font-weight:bold; font-style:normal; }
 .potion-book-time::before { content:'Preparation time: '; font-weight:bold; font-style:normal; }
 .potion-book-storage::before { content:'Storage: '; font-weight:bold; font-style:normal; }
 .potion-book-effect::before,.potion-book-ingredients::before,.potion-book-steps::before,.potion-book-result::before { display:block; margin:24px 0 12px; padding-bottom:6px; border-bottom:1px solid #76502b99; font-weight:bold; font-style:normal; font-size:17px; }
 .potion-book-effect::before { content:'Effect'; }
 .potion-book-ingredients::before { content:'Ingredients'; }
 .potion-book-steps::before { content:'Preparation'; }
 .potion-book-result::before { content:'Finished Potion'; }
 .potion-book-ingredients { display:block; }
 .potion-book-ingredients > div { padding:10px 0; text-align:left; font-size:15px; line-height:1.5; border-bottom:1px dotted #76502b66; }
 .potion-book-steps { display:block; list-style:none; padding:0; counter-reset:recipe-step; }
 .potion-book-steps li { display:block; padding:0 0 0 28px; position:relative; margin:0 0 18px; font-size:15px; line-height:1.5; counter-increment:recipe-step; }
 .potion-book-steps li::before { content:counter(recipe-step) '.'; position:absolute; left:0; top:0; font-weight:bold; font-style:normal; }
 .potion-book-steps li:empty { display:none; }
 .potion-book-close { top:7%; right:10%; width:34px; height:34px; background:#533216; color:#fae8bf; font-size:24px; }
 .ingredient-tip { position:relative; bottom:auto; left:auto; width:100%; max-width:none; box-sizing:border-box; margin-top:8px; }
}

/* Alchemist's manuscript ornaments, restricted to the mobile recipe. */
@media (max-width:760px) {
 .potion-book-content .potion-book-image {
  width:164px;height:184px;padding:14px 24px;margin:4px auto 20px;
  border:3px double #795022;border-radius:50%;
  background:radial-gradient(ellipse,#fff0bf33 25%,#6c401012 72%,transparent 74%);
  box-shadow:0 0 0 5px #79502215,inset 0 0 0 4px #79502212;
 }
 #potion-book-title { position:relative;padding:17px 8px;margin-bottom:26px; }
 #potion-book-title::before,#potion-book-title::after {
  content:'◆';position:absolute;left:50%;transform:translateX(-50%);font-style:normal;font-size:11px;line-height:14px;color:#654019;
 }
 #potion-book-title::before { top:-8px; }
 #potion-book-title::after { bottom:-8px; }
 .potion-book-content .potion-book-level,
 .potion-book-content .potion-book-time,
 .potion-book-content .potion-book-storage {
  padding:10px 13px;margin:0;border-left:3px double #795022;border-right:3px double #795022;
  background:linear-gradient(90deg,#7950220c,transparent 50%,#7950220c);
 }
 .potion-book-content .potion-book-level { border-top:3px double #795022;padding-top:14px; }
 .potion-book-content .potion-book-storage { border-bottom:3px double #795022;padding-bottom:14px;margin-bottom:24px; }
 .potion-book-effect::before,.potion-book-ingredients::before,.potion-book-steps::before,.potion-book-result::before {
  min-height:40px;padding:8px 0 8px 48px;line-height:40px;
  background-position:left center;background-size:38px 38px;background-repeat:no-repeat;
  border-bottom:3px double #795022;
 }
 .potion-book-effect::before { background-image:url('images/icons/energy.png'); }
 .potion-book-ingredients::before { background-image:url('images/icons/intent.png'); }
 .potion-book-steps::before { background-image:url('images/icons/symbols.png'); }
 .potion-book-result::before { background-image:url('images/icons/focus.png'); }
 .potion-book-ingredients > div { position:relative;padding:12px 0 12px 18px; }
 .potion-book-ingredients > div::before { content:'◇';position:absolute;left:0;top:13px;font-size:12px;font-style:normal; }
 .potion-book-steps li { padding:0 0 17px 38px;margin-bottom:17px;border-bottom:1px solid #79502244; }
 .potion-book-steps li::before {
  content:counter(recipe-step);width:25px;height:25px;line-height:25px;text-align:center;
  border:3px double #795022;border-radius:50%;font-size:13px;background:#f4dba92b;
 }
 .potion-book-result { padding:0 12px 16px;border:3px double #795022;box-shadow:inset 0 0 0 3px #7950220c; }
 .potion-book-result::before { margin-top:8px;font-size:16px; }
}

@media (max-width:760px) {
 .artifact-prev,.artifact-next {
  top:60px;
  transform:translateY(-50%);
 }
 .artifact-prev:hover,.artifact-next:hover { transform:translateY(-50%) scale(1.2); }
}
