/* The illustrated welcome scene is shown only before a game starts. */
body[data-dm-site-theme="game"]{background-image:var(--mh-play-background,url('./images/background.webp?v=3'))}
.mh-title-sign{display:none}
.mh-title-number b{font:inherit}
body:has(#intro:not([hidden])){background-color:#d6eabd;background-image:var(--mh-home-background,url('./images/intro-background.webp?v=3'));background-position:center top;background-size:cover}
body:has(#intro:not([hidden])) .mh-main{padding-top:0}
body:has(#intro:not([hidden])) .mh-title{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;max-width:1010px;height:clamp(160px,17vw,210px);margin:0 auto 8px;padding:48px 5% 29px;border:0;border-radius:0;background:none;box-shadow:none}
body:has(#intro:not([hidden])) .mh-title-sign{display:block;position:absolute;inset:0;width:100%;height:100%;z-index:-1}
body:has(#intro:not([hidden])) .mh-title h1{font-size:clamp(31px,4.4vw,54px);font-weight:900;line-height:1.2;letter-spacing:.015em;color:#633513;white-space:nowrap;text-shadow:0 2px #fff3cb}
body:has(#intro:not([hidden])) .mh-title-number{display:inline-flex;gap:2px;vertical-align:-.03em;margin:0 .05em;font-size:1.38em;line-height:1;font-weight:900;letter-spacing:-.03em}
body:has(#intro:not([hidden])) .mh-title-number b{color:#d27c20;filter:drop-shadow(1px 2px 0 #fff0b7)}
body:has(#intro:not([hidden])) .mh-title-number b:nth-child(2){color:#528640}
body:has(#intro:not([hidden])) .mh-title-number b:nth-child(3){color:#3884a2}
#intro{display:block;position:relative;max-width:1020px;padding:30px 38px 22px;margin:0 auto 18px;border:3px solid #f2ddb1;border-radius:38px 32px 36px 30px;background:radial-gradient(ellipse at 6% 3%,#fff9e0 0,transparent 53%),repeating-linear-gradient(108deg,#fff9eae8 0 2px,#fff8e6ed 2px 4px),#fff7e3;box-shadow:0 6px 0 #a88c5340,0 12px 30px #5971491a;isolation:isolate}
#intro::before{content:"";position:absolute;inset:9px;border:2px dashed #ddbb7c;border-radius:28px 23px 27px 22px;z-index:-1;pointer-events:none}
.mh-intro-overview{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr);grid-template-areas:"copy mascot" "note mascot";gap:0 14px;align-items:center}
.mh-intro-copy{grid-area:copy;min-width:0}
.mh-modes{border:0;padding:0;margin:0 0 50px;min-width:0}
.mh-modes legend{font-weight:800;color:#563c20;margin-bottom:10px;padding:0}
.mh-mode-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.mh-mode-option{display:flex;align-items:center;gap:9px;padding:10px 12px;min-height:68px;border:2px solid #d8c69b;border-radius:16px;background:#fffaf0;cursor:pointer;touch-action:manipulation}
.mh-mode-option:has(input:checked){background:#e7eed3;border-color:#7d9b5a;box-shadow:0 3px 0 #7b935430}
.mh-mode-option input{appearance:auto;width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:#207c4e}
.mh-mode-option strong,.mh-mode-option small{display:block}
.mh-mode-option strong{font-size:17px;color:#3b6034;white-space:nowrap}
.mh-mode-option small{font-size:12px;color:#736447}
#intro .mh-mode-hint{font-size:13px;line-height:1.7;color:#634a2c;margin:10px 0 0}
#intro .mh-tag{background:#f8e7b5;color:#705028;border-radius:30px;font-size:14px;padding:5px 14px}
#intro h2{display:table;margin:17px 0 15px;padding-bottom:10px;border-bottom:3px dashed #93a361;font-size:clamp(23px,2.6vw,31px);line-height:1.45;letter-spacing:.015em;color:#563c20;font-weight:900}
#intro h2 span{color:#416d35}
#intro h2 .mh-intro-go{display:inline-block;white-space:nowrap;color:#563c20}
.mh-keep-phrase{display:inline-block;white-space:nowrap}
#intro .mh-intro-instructions{margin:0 0 16px;font-size:15px;line-height:1.9;color:#634a2c}
#intro .mh-example{display:flex;align-items:center;justify-content:center;gap:12px;white-space:nowrap;background:#f2efcd;border:2px solid #ded59a;outline:1px dashed #d4c684;outline-offset:-7px;border-radius:19px;padding:10px 16px;margin:0;font-size:20px;font-weight:800;line-height:1.2;box-shadow:inset 0 2px 5px #a1a1470a}
#intro .mh-example>span:first-child{color:#0b8075}
#intro .mh-example>span:nth-of-type(2){color:#a45909}
#intro .mh-example>span>span{color:inherit}
#intro .mh-example b{font-size:37px;color:inherit}
#intro .mh-example i{font-size:27px;font-style:normal;color:#668354}
#intro .mh-example strong{font-size:46px;color:#1d613b;text-shadow:0 2px #fffdf1}
#intro .mh-encouragement{grid-area:note;margin:16px 0 0;color:#634a2c;font-size:15px;line-height:1.8}
.mh-encouragement small{display:block;font-size:13px;color:#786046}
.mh-mobile-break{display:none}
.mh-welcome{grid-area:mascot;position:relative;align-self:stretch;min-height:300px;pointer-events:none}
/* Beside the copy, the illustration must not stretch with a longer explanation. */
@media(min-width:761px){.mh-welcome{align-self:start;width:100%;min-width:0;aspect-ratio:1}}
.mh-welcome>img{position:absolute;width:120%;height:auto;max-width:none;right:-7%;bottom:-24px;z-index:1;filter:drop-shadow(0 5px 3px #6e48261a)}
#intro .mh-cheer-sign{position:absolute;top:-25px;right:-5px;z-index:2;margin:0;padding:8px 14px;border:5px solid #b1834d;border-radius:8px;background:repeating-linear-gradient(3deg,#f7e1b1 0 12px,#f0d5a1 12px 14px);color:#714c23;box-shadow:0 3px 0 #815f37, inset 0 0 0 2px #fff0c9;transform:rotate(6deg);font-size:14px;font-weight:800;line-height:1.6;text-align:center}
.mh-cheer-post{position:absolute;top:-45px;bottom:38px;right:49px;width:14px;border:2px solid #956530;border-radius:6px 6px 3px 3px;background:linear-gradient(90deg,#b5864d,#d1a668 45%,#a77940);transform:rotate(6deg);transform-origin:50% 60px;z-index:0}
.mh-cheer-rays{position:absolute;top:14%;left:9%;display:flex;gap:6px;transform:rotate(-25deg)}
.mh-cheer-rays i{display:block;width:7px;height:23px;background:#eca832;border-radius:5px;transform:rotate(-20deg)}
.mh-cheer-rays i:nth-child(2){height:30px;margin-top:-12px;transform:none}
.mh-cheer-rays i:nth-child(3){transform:rotate(30deg)}
@media(min-width:761px) and (max-width:1050px){.mh-cheer-rays{display:none}}
.mh-launch{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:32px;border-top:1px solid #dcc49180;padding-top:18px;margin:18px auto 0;max-width:780px}
#intro .mh-speed{margin:0;min-width:0}
#intro .mh-speed legend{font-size:14px;color:#6a512d;margin-bottom:6px}
#intro .mh-speed-option{background:#fffaf0;border:2px solid #d8c69b;border-radius:15px;min-height:68px;padding:8px 10px;gap:8px}
#intro .mh-speed-option:has(input:checked){background:#e7eed3;border-color:#7d9b5a;box-shadow:0 3px 0 #7b935430}
#intro .mh-speed-option strong{font-size:17px;color:#3b6034}
#intro .mh-speed-option small{font-size:11px;color:#736447}
#intro .mh-speed #speed-help{font-size:11px;margin:7px 0 0;color:#79674c}
.mh-start-controls{display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0}
#intro #start{position:relative;width:100%;min-width:0;margin:0;min-height:76px;font-size:32px;font-weight:900;border:3px solid #608945;border-radius:30px;background:linear-gradient(165deg,#9ebc67,#79a04f 52%,#5b843d);box-shadow:0 5px 0 #3c652f, inset 0 3px 0 #d7e5ae;letter-spacing:.08em;text-shadow:0 2px #43652f;color:#fffdec;transition:filter .12s,transform .12s}
#intro #start::after{content:"";position:absolute;inset:5px;border:2px dashed #d4dfa3;border-radius:21px;pointer-events:none}
#intro #start span{font-size:.72em;color:#f7e9b1;vertical-align:.08em;margin-right:6px}
#intro #start:not(:disabled):hover{filter:brightness(1.05);transform:translateY(-2px)}
#intro #start:not(:disabled):active{transform:translateY(2px)}
#intro [data-sound-toggle]{min-height:44px;padding:6px 18px;border-color:#c9bc94;border-radius:20px;background:#fffcf0;font-size:13px;color:#6a5535;box-shadow:none}
#intro [data-sound-toggle][aria-pressed="true"]{background:#e6f0d6;border-color:#7d9b5a;color:#375d2f}
#intro #asset-status{text-align:center;font-size:13px;color:#665331;margin:18px 0 0}
#intro #asset-retry{display:block;margin:10px auto}
#intro #best-intro{text-align:center;font-size:12px;margin:7px 0 0;color:#5b6f42}
#intro #best-intro:empty{display:none}
body:has(#intro:not([hidden])) .mh-help{position:relative;max-width:1020px;margin:18px auto 14px;border:2px solid #ead5aa;border-radius:24px;background:#fff9eaf5;padding:15px 28px;box-shadow:0 3px 0 #ad93512b;color:#604825}
body:has(#intro:not([hidden])) .mh-help::before{content:"";position:absolute;inset:6px;border:1px dashed #d8b97e;border-radius:17px;pointer-events:none}
body:has(#intro:not([hidden])) .mh-help summary{font-size:15px;color:#46683b}
body:has(#intro:not([hidden])) .mh-footer{position:relative;width:fit-content;max-width:100%;margin:0 auto;padding:12px 24px;border:2px solid #e2cf9f;border-radius:18px;background:#fff9e9ed;box-shadow:0 3px 0 #ad935125;font-weight:700;gap:24px}
body:has(#intro:not([hidden])) .mh-footer a+a{padding-left:24px;border-left:1px dashed #b78b48}
@media(max-width:760px){
 .mh-modes{margin-bottom:24px}
 .mh-mode-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .mh-mode-option{padding:9px 8px;gap:6px;min-height:64px}
 .mh-mode-option strong{font-size:16px}
 .mh-mode-option small{font-size:11px}
 body[data-dm-site-theme="game"]{background-image:var(--mh-play-background,url('./images/background-mobile.webp?v=3'))}
 body:has(#intro:not([hidden])){background-image:var(--mh-home-background,url('./images/intro-background-mobile.webp?v=3'));background-size:auto 100svh;background-attachment:fixed}
 body:has(#intro:not([hidden])) .mh-main{padding-left:10px;padding-right:10px}
 body:has(#intro:not([hidden])) .mh-title{height:clamp(110px,24vw,158px);margin-bottom:4px;padding:29px 5% 22px}
 body:has(#intro:not([hidden])) .mh-title h1{font-size:clamp(20px,5.25vw,34px);letter-spacing:0}
 body:has(#intro:not([hidden])) .mh-title-number{gap:0;margin:0 .02em;font-size:1.36em}
 #intro{padding:24px 22px 21px;border-radius:27px;margin-bottom:14px;text-align:left}
 #intro::before{inset:7px;border-radius:19px}
 .mh-intro-overview{grid-template-columns:minmax(0,1fr) 140px;grid-template-areas:"copy copy" "note mascot";gap:0}
 #intro .mh-tag{font-size:12px;padding:4px 10px;letter-spacing:0}
 #intro h2{font-size:24px;line-height:1.5;margin:12px 0;padding-bottom:8px}
 #intro .mh-intro-instructions{font-size:14px;line-height:1.85;margin-bottom:14px}
 #intro .mh-intro-instructions br{display:none}
 #intro .mh-example{padding:10px 9px;gap:8px;border-radius:15px;font-size:17px}
 #intro .mh-example b{font-size:28px}
 #intro .mh-example i{font-size:23px}
 #intro .mh-example strong{font-size:36px}
 #intro .mh-encouragement{font-size:14px;line-height:1.75;margin:12px 0 0;padding-right:10px}
 .mh-encouragement small{font-size:11px;line-height:1.7;margin-top:6px}
 .mh-mobile-break{display:block}
 .mh-welcome{min-height:134px}
 .mh-welcome>img{width:calc(100% + 14px);left:0;right:auto;bottom:-10px}
 #intro .mh-cheer-sign,.mh-cheer-post{display:none}
 .mh-cheer-rays{top:10%;left:19%;gap:3px;transform:scale(.6) rotate(-25deg)}
 .mh-launch{grid-template-columns:minmax(0,1fr);gap:18px;padding-top:12px;margin-top:12px}
 #intro .mh-speed-option{min-height:64px;padding:8px}
 #intro .mh-speed legend{font-size:13px}
 #intro .mh-speed #speed-help{font-size:11px}
 .mh-start-controls{gap:14px}
 #intro #start{min-height:66px;font-size:28px;border-radius:26px;max-width:380px}
 #intro #start::after{border-radius:17px}
 #intro #asset-status{font-size:12px;margin-top:12px;line-height:1.7}
 body:has(#intro:not([hidden])) .mh-help{margin-top:14px;padding:14px 21px}
 body:has(#intro:not([hidden])) .mh-help summary{font-size:14px}
 body:has(#intro:not([hidden])) .mh-footer{padding:12px 17px;gap:18px;font-size:13px}
 body:has(#intro:not([hidden])) .mh-footer a+a{padding-left:18px}
}
@media(max-width:360px){
 body:has(#intro:not([hidden])) .mh-main{padding-left:7px;padding-right:7px}
 body:has(#intro:not([hidden])) .mh-title h1{font-size:19px}
 #intro{padding:21px 17px 19px}
 #intro .mh-tag{font-size:11px;padding:4px 8px}
 #intro h2{font-size:22px}
 #intro .mh-example{font-size:15px;gap:6px;padding-left:8px;padding-right:8px}
 #intro .mh-example b{font-size:25px}
 #intro .mh-example strong{font-size:33px}
 .mh-intro-overview{grid-template-columns:minmax(0,1fr) 118px}
 #intro .mh-encouragement{font-size:13px}
 #intro .mh-speed-option{gap:5px;padding:8px 6px}
 #intro .mh-speed-option strong{font-size:16px}
}
@media(prefers-reduced-motion:reduce){#intro #start{transition:none}#intro #start:not(:disabled):hover,#intro #start:not(:disabled):active{transform:none}}
