/* Unified Boot & Title Experience for YAKA (Refined Pearl-Lavender Handheld Aesthetic) */
.boot-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;box-sizing:border-box;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);overflow:hidden;background:radial-gradient(120% 80% at 50% 18%,#f4ebfc 0%,#d9c6ef 52%,#b59ed4 100%);color:#473056;font-family:var(--ui-font);transition:opacity .32s ease}
.boot-screen[hidden]{display:none!important}
.boot-screen.boot-leaving{opacity:0;pointer-events:none}

/* Prevent cabinet from leaking/flashing during boot */
body[data-game-mode="minimal"]:not(.game-started) .cabinet{visibility:hidden!important;pointer-events:none!important}

/* The Handheld Console Canvas */
.boot-shell{--boot-unit:1vw;position:absolute;width:min(100vw,46.15385dvh);height:auto;aspect-ratio:852/1846;margin:0;padding:calc(var(--boot-unit)*3.2);border-radius:calc(var(--boot-unit)*10);border:0;background:none;box-shadow:none;overflow:hidden;isolation:isolate;box-sizing:border-box}
.boot-inner{position:relative;width:100%;height:100%;overflow:hidden;border-radius:calc(var(--boot-unit)*7.4);border:1.5px solid rgba(255,255,255,.88);background:radial-gradient(ellipse 95% 60% at 50% 24%,#ffffff 0%,#f7effe 32%,#e9daf7 68%,#d4beec 100%);box-shadow:inset 0 2px 0 rgba(255,255,255,.95),inset 0 -10px 28px rgba(132,96,174,.22),0 18px 46px rgba(84,52,118,.28);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--boot-unit)*11);padding:calc(var(--boot-unit)*10) calc(var(--boot-unit)*6.5) calc(var(--boot-unit)*11);box-sizing:border-box}
.boot-inner::before{content:'';position:absolute;inset:calc(var(--boot-unit)*2.4);border-radius:calc(var(--boot-unit)*5.4);border:1px solid rgba(255,255,255,.55);pointer-events:none;z-index:1}
.boot-inner::after{content:'';position:absolute;left:50%;top:31%;width:78%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;border:1px dashed rgba(176,138,214,.28);box-shadow:0 0 0 18px rgba(255,255,255,.16);pointer-events:none;z-index:1}

/* Full-bleed edge-to-edge on mobile portrait (e.g., iPhone XS Safari) */
.boot-screen[data-fullbleed="1"]{padding:0}
.boot-screen[data-fullbleed="1"] .boot-shell{width:100%!important;height:100%!important;left:0!important;top:0!important;aspect-ratio:auto!important;padding:0!important;border-radius:0!important}
.boot-screen[data-fullbleed="1"] .boot-inner{border-radius:0!important;border:0!important;box-shadow:inset 0 -18px 42px rgba(132,96,174,.18)!important;padding:calc(env(safe-area-inset-top,0px) + 20px) 24px calc(env(safe-area-inset-bottom,0px) + 24px)!important;gap:calc(var(--boot-unit)*9)}
.boot-screen[data-fullbleed="1"] .boot-inner::before{display:none}

/* Floating Atmosphere: Twinkling Stars & Drifting Notes */
.title-bg-fx{position:absolute;inset:0;pointer-events:none;z-index:1;overflow:hidden}
.title-cd-shimmer{position:absolute;left:8%;top:22%;width:84%;height:42%;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.5) 0%,rgba(255,212,242,.26) 40%,rgba(196,232,255,.22) 64%,transparent 80%);filter:blur(8px);animation:cd-shimmer-sweep 8s ease-in-out infinite alternate}
@keyframes cd-shimmer-sweep{0%{transform:rotate(-12deg) scale(.94);opacity:.45}100%{transform:rotate(12deg) scale(1.06);opacity:.82}}

.title-notes{position:absolute;inset:0;pointer-events:none}
.title-note{position:absolute;color:#be93e4;opacity:.48;filter:drop-shadow(0 2px 5px rgba(172,126,214,.32))}
.title-note.n1{left:11%;bottom:24%;width:22px;height:30px;animation:title-note-drift 6.8s ease-in-out infinite}
.title-note.n2{right:12%;top:24%;width:19px;height:25px;color:#ea9fc9;animation:title-note-drift 8s ease-in-out 1.8s infinite}
.title-note.n3{left:48%;top:16%;width:16px;height:22px;color:#d6b2f2;animation:title-note-drift 5.8s ease-in-out .9s infinite}
@keyframes title-note-drift{0%,100%{transform:translateY(0) rotate(-5deg)}50%{transform:translateY(-11px) rotate(7deg)}}

.title-sparkles{position:absolute;inset:0;pointer-events:none}
.title-sparkles .sp{position:absolute;font-size:14px;color:#f4b3db;opacity:.65;filter:drop-shadow(0 0 6px rgba(255,190,230,.65));animation:title-star-twinkle 3.4s ease-in-out infinite}
.sp.s1{left:14%;top:18%;font-size:15px;color:#f2d388;animation-delay:0s}
.sp.s2{right:15%;top:17%;font-size:13px;color:#cba2f2;animation-delay:.7s}
.sp.s3{left:18%;top:52%;font-size:14px;color:#f3a3ce;animation-delay:1.4s}
.sp.s4{right:14%;bottom:23%;font-size:16px;color:#f4b6db;animation-delay:2.1s}
.sp.s5{left:50%;bottom:13%;font-size:12px;color:#e7c97e;animation-delay:2.8s}
.sp.s6{right:24%;top:53%;font-size:12px;color:#eba7d2;animation-delay:1.5s}
@keyframes title-star-twinkle{0%,100%{transform:scale(.82) rotate(0);opacity:.28}50%{transform:scale(1.18) rotate(14deg);opacity:.95}}

/* Skip Button */
.boot-skip{position:absolute;right:calc(var(--boot-unit)*4.5);top:calc(var(--boot-unit)*4.5);z-index:10;min-width:60px;min-height:36px;padding:4px 14px;border:1px solid rgba(255,255,255,.85);border-radius:999px;background:rgba(255,255,255,.72);box-shadow:0 2px 8px rgba(110,80,140,.14);color:#6b4d7c;font:600 12px var(--ui-font);backdrop-filter:blur(6px);cursor:pointer;transition:transform .12s,background .12s,opacity .3s}
.boot-skip:hover{background:#ffffff}
.boot-skip:active{transform:translateY(2px)}
.boot-screen[data-stage=title] .boot-skip{opacity:0;pointer-events:none;display:none!important}

/* Center Brand Content */
.boot-content{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;width:100%;box-sizing:border-box;text-align:center}
.boot-eyebrow{display:inline-flex;align-items:center;padding:calc(var(--boot-unit)*1.2) calc(var(--boot-unit)*3.6);border-radius:999px;border:1px solid rgba(202,174,232,.55);background:rgba(255,255,255,.68);box-shadow:0 2px 10px rgba(145,105,185,.12),inset 0 1px 0 #fff;font-size:calc(var(--boot-unit)*2.35);letter-spacing:.22em;color:#7a5893;margin-bottom:calc(var(--boot-unit)*5.5);font-weight:700}

/* Brand Logo (Clean Transparent Vector Asset) */
.boot-brand{width:min(324px,92%);aspect-ratio:307/135;flex:none;background:url('yaka-logo-v2.png') center/contain no-repeat;filter:drop-shadow(0 calc(var(--boot-unit)*1.2) calc(var(--boot-unit)*2.2) rgba(98,64,136,.24));animation:logo-float 4.8s ease-in-out infinite}
@keyframes logo-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}

.boot-tagline{margin:calc(var(--boot-unit)*4.5) 0 0;font-size:calc(var(--boot-unit)*3.45);letter-spacing:.18em;color:#523466;font-weight:700;line-height:1.7;text-shadow:0 1px 4px rgba(255,255,255,.92)}
.boot-stars{display:flex;align-items:center;gap:calc(var(--boot-unit)*3.2);margin-top:calc(var(--boot-unit)*3.6);color:#a47bbd;font-size:calc(var(--boot-unit)*2.8)}
.boot-stars:before,.boot-stars:after{content:'';width:calc(var(--boot-unit)*9.5);height:1px;background:linear-gradient(90deg,transparent,rgba(164,123,189,.45))}
.boot-stars:after{transform:rotate(180deg)}
.boot-stars span:nth-child(2){color:#df7ab8;font-size:calc(var(--boot-unit)*4);animation:boot-star 1.8s ease-in-out infinite}
@keyframes boot-star{0%,100%{opacity:.72;transform:scale(.95)}50%{opacity:1;transform:scale(1.12)}}

/* Stage 1: Loading State */
.boot-loading-deck{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;width:100%;transition:opacity .32s ease,transform .32s ease}
.boot-line{width:calc(var(--boot-unit)*48);height:7px;border-radius:99px;background:rgba(196,172,224,.45);border:1px solid rgba(255,255,255,.72);box-shadow:inset 0 1px 2px rgba(96,68,128,.2);overflow:hidden;position:relative}
.boot-line i{display:block;height:100%;width:100%;border-radius:99px;background:linear-gradient(90deg,#e38bc2,#b38ae8 50%,#e38bc2);background-size:200% 100%;box-shadow:0 0 10px rgba(220,135,190,.65);transform-origin:left;animation:boot-progress 2s cubic-bezier(.22,.61,.36,1) forwards,boot-sheen 1.4s linear infinite}
@keyframes boot-progress{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}
@keyframes boot-sheen{0%{background-position:0% 0}100%{background-position:200% 0}}

.boot-loading-tag{font-size:calc(var(--boot-unit)*2.15);letter-spacing:.2em;color:#83619a;font-weight:700;margin-top:calc(var(--boot-unit)*2.8)}
.boot-developer{text-align:center;margin-top:calc(var(--boot-unit)*4.5);padding-top:calc(var(--boot-unit)*3);border-top:1px dashed rgba(178,144,212,.38);width:calc(var(--boot-unit)*48)}
.boot-developer small{display:block;font-size:calc(var(--boot-unit)*1.85);letter-spacing:.22em;color:#9172a8;font-weight:600}
.boot-developer strong{display:block;margin-top:calc(var(--boot-unit)*.8);font-size:calc(var(--boot-unit)*3.2);font-weight:700;letter-spacing:.05em;color:#523466;text-shadow:0 1px 2px rgba(255,255,255,.75)}

/* When switched to title stage, loading deck fades away */
.boot-screen[data-stage=title] .boot-loading-deck{opacity:0;transform:translateY(8px);pointer-events:none;display:none}

/* Stage 2: Title State Action Buttons */
.title-actions{position:relative;z-index:3;display:none;flex-direction:column;align-items:center;gap:calc(var(--boot-unit)*3.2);width:100%;max-width:calc(var(--boot-unit)*60);animation:title-actions-enter .42s cubic-bezier(.16,.84,.44,1) both}
.boot-screen[data-stage=title] .title-actions{display:flex}
@keyframes title-actions-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

.title-start{position:relative;display:flex;align-items:center;justify-content:center;gap:calc(var(--boot-unit)*2);width:100%;min-height:54px;padding:calc(var(--boot-unit)*3) calc(var(--boot-unit)*6);border:1.5px solid #ffffff;border-radius:999px;background:linear-gradient(180deg,#ffffff 0%,#faf3fe 56%,#f0e2fa 100%);box-shadow:0 10px 24px rgba(124,82,164,.26),0 2px 0 rgba(182,148,214,.65),inset 0 2px 0 #ffffff;color:#4f2e66;font:700 calc(var(--boot-unit)*4.1) var(--ui-font);letter-spacing:.06em;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}
.title-start:hover{transform:translateY(-2px);box-shadow:0 14px 28px rgba(124,82,164,.34),0 3px 0 rgba(182,148,214,.7),inset 0 2px 0 #ffffff;filter:brightness(1.02)}
.title-start:active{transform:translateY(1px);box-shadow:0 4px 12px rgba(124,82,164,.24),0 1px 0 rgba(182,148,214,.55),inset 0 1px 0 #ffffff}
.title-start .title-cursor{color:#d869ae;font-size:.88em;animation:cursor-bounce .9s ease-in-out infinite alternate}
@keyframes cursor-bounce{0%{transform:translateX(0)}100%{transform:translateX(3px)}}

.title-about{background:rgba(255,255,255,.52);border:1px solid rgba(212,188,236,.75);box-shadow:0 3px 10px rgba(124,88,162,.1),inset 0 1px 0 rgba(255,255,255,.9);color:#6e4e85;font:600 calc(var(--boot-unit)*2.95) var(--ui-font);letter-spacing:.08em;min-height:38px;padding:calc(var(--boot-unit)*1.6) calc(var(--boot-unit)*6);border-radius:999px;cursor:pointer;transition:color .12s,background .12s,transform .12s}
.title-about:hover{color:#4d2c64;background:rgba(255,255,255,.82);transform:translateY(-1px)}
.title-about:active{transform:translateY(1px)}

/* Dialog Styles: Developer Note / CD Liner Letter */
.title-about-dialog{border:1.5px solid rgba(224,204,245,.9);border-radius:28px;background:linear-gradient(168deg,#fffdfefc 0%,#f9f3fdfa 65%,#f5ebfa 100%);color:#473455;box-shadow:0 18px 48px rgba(70,40,95,.32),0 0 0 1px #ffffffb0 inset;padding:28px 24px 20px;width:min(90vw,380px);max-width:380px;max-height:88vh;overflow-y:auto;overscroll-behavior:contain;font-family:var(--ui-font);box-sizing:border-box;position:relative;animation:dialog-pop .28s cubic-bezier(.17,.89,.32,1.2)}
@keyframes dialog-pop{from{opacity:0;transform:scale(.92) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}
.title-about-dialog::before{content:'♫';position:absolute;right:-12px;bottom:-24px;font-size:140px;color:rgba(205,175,235,.12);pointer-events:none;font-family:serif;line-height:1}
.title-about-dialog::backdrop{background:rgba(25,16,38,.65);backdrop-filter:blur(5px)}

.about-card-head{text-align:center;margin-bottom:16px;position:relative;z-index:2}
.about-card-badge{display:inline-block;font-size:10px;letter-spacing:.22em;font-weight:700;color:#9b72b5;background:rgba(180,140,215,.14);padding:3px 12px;border-radius:99px;margin-bottom:8px;text-transform:uppercase}
.about-card-title{margin:0;font-size:20px;letter-spacing:.04em;color:#4c2960;font-weight:700;text-shadow:0 1px 2px #ffffffc0}

.about-card-body{position:relative;z-index:2;display:flex;flex-direction:column;gap:11px}
.about-card-body p{font-size:13px;line-height:1.82;margin:0;color:#5a4269;text-align:left;letter-spacing:.02em}
.about-p-greet{font-size:14px!important;color:#4c2960!important;font-weight:600}
.about-p-greet strong{color:#cf60a5;font-weight:700}
.about-p-spark{padding:8px 12px;background:rgba(215,180,240,.18);border-left:3px solid #cf60a5;border-radius:4px 10px 10px 4px;color:#4c2960!important;font-weight:600}
.about-p-heart{padding-top:6px;border-top:1px dashed rgba(185,155,215,.35);color:#472c57!important;font-weight:600}

.about-card-foot{margin-top:18px;display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;z-index:2}
.about-card-sign{display:flex;flex-direction:column;align-items:flex-start}
.about-card-sign small{font-size:9.5px;letter-spacing:.18em;color:#9c80ad;font-weight:600}
.about-card-sign span{font-size:12px;font-weight:700;color:#59386c}

.about-card-confirm{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 18px;border:1px solid rgba(255,255,255,.9);border-radius:99px;background:linear-gradient(135deg,#fcf2f9,#f1d7eb 60%,#ebd0e8);box-shadow:0 3px 10px rgba(165,100,165,.25),inset 0 1px #fff;color:#603258;font:700 12px var(--ui-font);cursor:pointer;transition:transform .12s,box-shadow .12s}
.about-card-confirm:hover{transform:translateY(-1.5px);box-shadow:0 5px 14px rgba(165,100,165,.35)}
.about-card-confirm:active{transform:translateY(1px);box-shadow:0 2px 6px rgba(165,100,165,.2)}

.title-about-close{position:absolute;top:16px;right:18px;width:30px;height:30px;border-radius:50%;border:1px solid rgba(200,175,225,.3);background:rgba(235,220,248,.65);color:#6f4d82;font-size:16px;display:grid;place-items:center;cursor:pointer;z-index:5;transition:background .15s,transform .15s}
.title-about-close:hover{background:#eedaf7;transform:rotate(90deg)}

@media(prefers-reduced-motion:reduce){.boot-screen,.boot-screen *{animation:none!important;transition:none!important}}
