/* A warm, tactile music phone. Scene and conversation logic stay untouched. */
#panel.phone-panel{
 --phone-bg:#f2eddf;--phone-card:#fffcf3;--phone-ink:#263b33;--phone-muted:#6c7768;
 --phone-accent:#3c6654;--phone-soft:#e0e7d5;--phone-line:#cdd3bf;
 padding:7px;border:1px solid #b3b39a;border-radius:36px;
 background:linear-gradient(135deg,#6d7768,#26372f 35%,#121f19 70%,#79816f);
 box-shadow:inset 0 0 0 2px #17261f,0 24px 80px #0008,0 0 0 1px #101d18;
}
#panel.phone-panel[open]{animation:ak-phone-open .38s cubic-bezier(.16,1,.3,1) both}
#panel.phone-panel::backdrop{background:#1020199c;backdrop-filter:blur(5px)}
#panel.phone-panel .phone-shell{border-radius:29px;background:var(--phone-bg);box-shadow:inset 0 0 0 1px #fff8}
#panel.phone-panel .phone-status{background:linear-gradient(#f9f5e9,#f2eddf);height:48px;font-size:12px;letter-spacing:.03em}
#panel.phone-panel #close{top:9px;right:11px;border:1px solid #66765a25;background:#ffffff45;transition:background .18s,transform .18s}
#panel.phone-panel #close:hover{background:#dde5d1}
#panel.phone-panel #close:active{transform:scale(.91)}
#panel.phone-panel .phone-battery{background:#66805c;border-color:#576a50}
#panel.phone-panel .phone-home{
 position:relative;isolation:isolate;min-height:100%;padding:22px 20px;gap:20px;
 background:radial-gradient(ellipse at 95% 5%,#c7d6b475,transparent 50%),radial-gradient(ellipse at 0 100%,#dbc59d55,transparent 55%),#f2eddf;
}
#panel.phone-panel .phone-home::before{content:'';position:absolute;z-index:-1;pointer-events:none;width:230px;height:230px;right:-100px;top:-40px;border:1px solid #657d5420;border-radius:50%;box-shadow:0 0 0 24px #657d5406,0 0 0 48px #657d5405,0 0 0 72px #657d5404}
#panel.phone-panel .phone-home-heading{align-items:center;padding:0 2px}
#panel.phone-panel .phone-home-heading small{font-size:10px;letter-spacing:.25em;font-weight:750}
#panel.phone-panel .phone-clock{font-size:64px;font-weight:300;line-height:1.12;letter-spacing:-4px;font-variant-numeric:tabular-nums;margin-top:7px}
#panel.phone-panel .phone-night{border-left:1px solid #7b8b663b;padding:6px 0 6px 12px;font-size:9px;letter-spacing:.14em;color:#65745b}
#panel.phone-panel .phone-ep-card{
 position:relative;overflow:hidden;flex-shrink:0;min-height:140px;padding:20px 16px;gap:15px;
 border:1px solid #8d9e75;border-radius:19px;color:#f4ebd1;
 background:radial-gradient(ellipse at 100% 0,#a3b27d50,transparent 65%),linear-gradient(125deg,#294e40,#152e27);
 box-shadow:inset 0 1px #fff3,0 9px 22px #1c382624,0 2px 0 #19372b;
 transition:transform .2s,box-shadow .2s;
}
#panel.phone-panel .phone-ep-card::after{content:'';position:absolute;pointer-events:none;inset:5px;border:1px solid #e4dcb81a;border-radius:14px}
#panel.phone-panel .phone-ep-card img{width:82px;height:82px;object-fit:cover;border-radius:9px;box-shadow:0 5px 12px #0005;transform:rotate(-4deg);transition:transform .3s}
#panel.phone-panel .phone-ep-card small{color:#bac9a8;font-size:9px;letter-spacing:.2em}
#panel.phone-panel .phone-ep-card strong{font-size:17px;color:#fff5d9;line-height:1.3;margin-top:5px}
#panel.phone-panel .phone-ep-card span span{color:#bdcbb0;font-size:11px;margin-top:10px}
#panel.phone-panel .phone-ep-card b{color:#e6d6a5;font-size:28px}
#panel.phone-panel .phone-home .phone-home-note{padding:0 4px;font-size:13px;line-height:1.5;color:#65735e}
#panel.phone-panel .phone-apps{gap:12px}
#panel.phone-panel .phone-apps button{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
 min-height:100px;padding:13px 10px;border-radius:18px;border:1px solid #a7b19975;
 background:linear-gradient(145deg,#fffdf7e6,#e7e9d9c9);box-shadow:inset 0 1px #fff,0 3px 0 #a7ad9026,0 5px 12px #35432d08;
 color:#304737;font-size:12px;font-weight:650;letter-spacing:.01em;transition:transform .2s,box-shadow .2s,background .2s;
}
#panel.phone-panel .phone-apps i{width:42px;height:42px;border-radius:13px;box-shadow:inset 0 1px #ffffff50,0 3px 6px #233d3020;background:linear-gradient(145deg,#63876e,#345f4c);color:#f5efd6}
#panel.phone-panel .phone-apps .app-messages{background:linear-gradient(145deg,#849b67,#526f42)}
#panel.phone-panel .phone-apps .app-notes{background:linear-gradient(145deg,#bd9c66,#8b6b40)}
#panel.phone-panel .phone-apps .app-music{background:linear-gradient(145deg,#9c766c,#6c4c4d)}
#panel.phone-panel .phone-apps svg{width:24px;height:24px}
#panel.phone-panel .phone-apps button:active{transform:scale(.96);box-shadow:inset 0 2px 4px #56674620;background:#dce4d1}
#panel.phone-panel .phone-home-bar{height:60px;border-top:1px solid #bbc5ac70;background:linear-gradient(#e9e8da,#dedfce);box-shadow:inset 0 1px #fff8}
#panel.phone-panel .phone-home-button{border-color:#96a18b;background:linear-gradient(#fbf9ee,#ced5be);box-shadow:inset 0 2px #ffffffe0,inset 0 -2px 4px #78876a40,0 2px 4px #364b3020}
#panel.phone-panel .phone-home-button::before{border-color:#647659}
#panel.phone-panel .phone-app-header{background:linear-gradient(120deg,#f7f4e9,#e7ecdc);border-bottom-color:#b7c5aa80}
#panel.phone-panel .phone-message{box-shadow:0 2px 8px #2841310b;border:1px solid #bec8b330}
#panel.phone-panel .phone-message.you{background:linear-gradient(120deg,#dce8cc,#cbdcbc)}
#panel.phone-panel .phone-notes p{border-left:3px solid #8c9e6b;box-shadow:0 3px 12px #3d4c2908}
#panel.phone-panel .phone-call-button{background:linear-gradient(135deg,#527e5e,#2b5943);box-shadow:inset 0 1px #fff3,0 4px 12px #254d3025;color:#fff8e6;border:1px solid #3d6449}
#panel.phone-panel .phone-avatar{box-shadow:0 0 0 4px #f9f6e9,0 0 0 5px #9bad8b70,0 6px 16px #2d412a20}
@media(hover:hover){
 #panel.phone-panel .phone-apps button:hover{transform:translateY(-3px);background:#fffdf3;box-shadow:inset 0 1px #fff,0 5px 0 #a7ad9026,0 9px 18px #35432d12}
 #panel.phone-panel .phone-ep-card:hover{transform:translateY(-2px);background:radial-gradient(ellipse at 100% 0,#b0be8a60,transparent 65%),linear-gradient(125deg,#335f4d,#1c3b30)}
 #panel.phone-panel .phone-ep-card:hover img{transform:rotate(0)}
}
@keyframes ak-phone-open{from{opacity:0}to{opacity:1}}
@keyframes ak-phone-tile{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
#panel.phone-panel .phone-home-heading,#panel.phone-panel .phone-ep-card,#panel.phone-panel .phone-apps button{animation:ak-phone-tile .4s cubic-bezier(.16,1,.3,1) both}
#panel.phone-panel .phone-ep-card{animation-delay:.05s}
#panel.phone-panel .phone-apps button:nth-child(1){animation-delay:.09s}
#panel.phone-panel .phone-apps button:nth-child(2){animation-delay:.13s}
#panel.phone-panel .phone-apps button:nth-child(3){animation-delay:.17s}
#panel.phone-panel .phone-apps button:nth-child(4){animation-delay:.21s}
@media(max-width:900px) and (orientation:portrait), (max-width:1100px) and (max-height:600px) and (orientation:landscape){
 body.mobile-ds #panel.phone-panel[data-ui-active=true]{border-radius:0;padding:0;box-shadow:none}
 #panel.phone-panel .phone-shell{border-radius:0}
 #panel.phone-panel .phone-status{height:calc(48px + env(safe-area-inset-top,0px))}
 #panel.phone-panel .phone-home-bar{height:calc(60px + env(safe-area-inset-bottom,0px))}
}
@media(max-height:690px){
 #panel.phone-panel .phone-home{gap:14px;padding:16px}
 #panel.phone-panel .phone-clock{font-size:48px}
 #panel.phone-panel .phone-ep-card{min-height:110px;padding:14px}
 #panel.phone-panel .phone-ep-card img{width:68px;height:68px}
 #panel.phone-panel .phone-apps button{min-height:78px;gap:6px;padding:9px}
 #panel.phone-panel .phone-apps i{width:36px;height:36px;border-radius:11px}
}
@media(max-height:570px){
 #panel.phone-panel .phone-home{gap:10px;padding:12px 16px}
 #panel.phone-panel .phone-clock{font-size:38px}
 #panel.phone-panel .phone-home-heading small{font-size:9px}
 #panel.phone-panel .phone-ep-card{min-height:92px;padding:11px}
 #panel.phone-panel .phone-ep-card img{width:58px;height:58px}
 #panel.phone-panel .phone-ep-card strong{font-size:15px}
 #panel.phone-panel .phone-home .phone-home-note{font-size:12px}
 #panel.phone-panel .phone-apps button{min-height:68px;gap:5px;padding:6px}
 #panel.phone-panel .phone-apps i{width:30px;height:30px;border-radius:9px}
 #panel.phone-panel .phone-apps svg{width:20px;height:20px}
}
@media(prefers-reduced-motion:reduce){#panel.phone-panel,#panel.phone-panel *,#panel.phone-panel *::before,#panel.phone-panel *::after{animation:none!important;transition:none!important}}
/* Keep the dashboard inside the actual device, including short desktop windows. */
#panel.phone-panel .phone-home{width:100%;max-width:100%;height:100%;min-height:0;margin:0;overflow:hidden;flex:1 1 auto}
#panel.phone-panel .phone-home::before{display:none}
@media(min-width:901px) and (max-height:800px){
 #panel.phone-panel .phone-home{gap:12px;padding:14px 18px}
 #panel.phone-panel .phone-clock{font-size:46px}
 #panel.phone-panel .phone-ep-card{min-height:108px;padding:13px}
 #panel.phone-panel .phone-ep-card img{width:65px;height:65px}
 #panel.phone-panel .phone-apps button{min-height:74px;gap:6px;padding:8px}
 #panel.phone-panel .phone-apps i{width:34px;height:34px;border-radius:10px}
}
@media(max-height:570px){
 #panel.phone-panel .phone-home{gap:8px;padding:10px 14px}
 #panel.phone-panel .phone-clock{font-size:34px}
 #panel.phone-panel .phone-ep-card{min-height:86px;padding:9px}
 #panel.phone-panel .phone-ep-card img{width:54px;height:54px}
 #panel.phone-panel .phone-apps button{min-height:62px;gap:4px;padding:5px}
 #panel.phone-panel .phone-apps i{width:28px;height:28px}
}
/* Engraved brass dashboard, matching the title screen rather than generic app tiles. */
#panel.phone-panel:has(.phone-home){--phone-bg:#17251f;--phone-ink:#efe3c4;--phone-muted:#b0b69c;--phone-line:#7a80544d;background:linear-gradient(135deg,#b6a478,#394736 30%,#14241c 65%,#8d916b);border-color:#b7a272}
#panel.phone-panel:has(.phone-home) .phone-status{background:linear-gradient(#26372a,#1c2c23);color:#d9d9b9}
#panel.phone-panel:has(.phone-home) #close{background:#c2b77e0e;color:#dfd6b3;border-color:#b7a27240}
#panel.phone-panel:has(.phone-home) #close:hover{background:#b6aa7730}
#panel.phone-panel .phone-home{background:radial-gradient(ellipse at 90% 0,#a2ac6433,transparent 60%),radial-gradient(ellipse at 0 100%,#879b5320,transparent 60%),repeating-linear-gradient(0deg,#c3ce9b03 0 1px,transparent 1px 4px),linear-gradient(145deg,#27372a,#13231d);color:#e9dfbf}
#panel.phone-panel .phone-home-heading{border-bottom:1px solid #c5b88038;padding-bottom:14px}
#panel.phone-panel .phone-home-heading small{color:#c6bd94;letter-spacing:.28em}
#panel.phone-panel .phone-clock{color:#f1e5be;text-shadow:0 0 30px #e7d38d18;font-family:'Syne Mono','Courier New',monospace;font-size:54px;letter-spacing:-3px;font-weight:400}
#panel.phone-panel .phone-night{color:#b5bb97;border-color:#b8b37745}
#panel.phone-panel .phone-ep-card{background:radial-gradient(ellipse at 100% 0,#bba96527,transparent 70%),linear-gradient(135deg,#374333,#1e3026);border-color:#b9a97588;border-radius:7px;box-shadow:inset 0 1px #fff3,0 6px 20px #0003}
#panel.phone-panel .phone-ep-card::after{border-radius:3px;border-color:#e5d19a20}
#panel.phone-panel .phone-ep-card img{border-radius:3px;border:1px solid #e4d4aa75}
#panel.phone-panel .phone-ep-card small{color:#d0bd85;font-family:'Syne Mono',monospace}
#panel.phone-panel .phone-ep-card strong{font-family:'Nintendo DS',monospace;font-size:24px;font-weight:400;line-height:1.05;letter-spacing:.02em}
#panel.phone-panel .phone-ep-card span span{color:#b4bda0}
#panel.phone-panel .phone-home .phone-home-note{color:#bac1a6;font-size:12px}
#panel.phone-panel .phone-apps{gap:12px}
#panel.phone-panel .phone-apps button{
 position:relative;isolation:isolate;overflow:hidden;border-radius:7px;min-height:106px;gap:7px;padding:12px;
 border:1px solid #b1a16b80;color:#eddfb6;
 background:radial-gradient(ellipse at 50% 0,#c2ab6524,transparent 75%),linear-gradient(145deg,#34402f,#1b2b22);
 box-shadow:inset 0 1px #eee3b52b,0 3px 0 #08160e80,0 7px 16px #0002;
 font-family:'Syne Mono','Courier New',monospace;font-size:12px;font-weight:400;letter-spacing:.035em;
}
#panel.phone-panel .phone-apps button::before{content:'';position:absolute;inset:4px;border:1px solid #e4ce8d1c;border-radius:3px;pointer-events:none}
#panel.phone-panel .phone-apps button::after{content:'';position:absolute;pointer-events:none;left:50%;bottom:7px;width:18px;height:2px;transform:translateX(-50%);background:#a89a5d66;box-shadow:0 0 8px #d9c57a15}
#panel.phone-panel .phone-apps i,#panel.phone-panel .phone-apps :is(.app-messages,.app-notes,.app-music){width:48px;height:48px;border:0;border-radius:0;color:#e6cd8b;background:none;box-shadow:none;filter:drop-shadow(0 2px 0 #0005);transition:color .2s,filter .2s,transform .25s}
#panel.phone-panel .phone-apps svg{width:48px;height:48px;overflow:visible}
#panel.phone-panel .phone-apps button:active{background:#43503a;transform:scale(.97);box-shadow:inset 0 2px 6px #07150d50}
#panel.phone-panel:has(.phone-home) .phone-home-bar{background:linear-gradient(#203126,#17251d);border-color:#a699673d;box-shadow:inset 0 1px #e9d9a110}
#panel.phone-panel:has(.phone-home) .phone-home-button{border-color:#a8976375;background:linear-gradient(#47543b,#263b2c);box-shadow:inset 0 1px #f5df9d40,0 2px 4px #0005}
#panel.phone-panel:has(.phone-home) .phone-home-button::before{border-color:#d6c38c}
@media(hover:hover){
 #panel.phone-panel .phone-apps button:hover{background:radial-gradient(ellipse at 50% 0,#d5bb7138,transparent 75%),linear-gradient(145deg,#43503a,#283b2d);border-color:#e2c882;box-shadow:inset 0 1px #fff3,0 4px 0 #08160e80,0 0 20px #ccaf5e12}
 #panel.phone-panel .phone-apps button:hover i{color:#ffe8a9;filter:drop-shadow(0 0 7px #f2d48740);transform:translateY(-2px)}
 #panel.phone-panel .phone-ep-card:hover{background:linear-gradient(135deg,#44503b,#293b2c);border-color:#e2c882}
}
@media(max-height:690px),(min-width:901px) and (max-height:800px){
 #panel.phone-panel .phone-clock{font-size:40px}
 #panel.phone-panel .phone-home-heading{padding-bottom:8px}
 #panel.phone-panel .phone-apps button{min-height:78px;padding:8px;gap:4px}
 #panel.phone-panel .phone-apps i,#panel.phone-panel .phone-apps svg{width:36px;height:36px}
 #panel.phone-panel .phone-ep-card strong{font-size:21px}
}
@media(max-height:570px){
 #panel.phone-panel .phone-clock{font-size:30px}
 #panel.phone-panel .phone-apps button{min-height:65px;padding:6px;gap:3px;font-size:11px}
 #panel.phone-panel .phone-apps i,#panel.phone-panel .phone-apps svg{width:30px;height:30px}
 #panel.phone-panel .phone-ep-card strong{font-size:19px}
}
/* Warm paper and muted olive: a quieter companion to the game's menus. */
#panel.phone-panel:has(.phone-home){--phone-bg:#eee9da;--phone-ink:#344234;--phone-muted:#71775e;--phone-line:#c8cbb5;background:linear-gradient(135deg,#aaa88d,#424d3d 35%,#28392d 70%,#8e9276);border-color:#93977d}
#panel.phone-panel:has(.phone-home) .phone-status{background:linear-gradient(#f8f4e8,#eee9da);color:#536047}
#panel.phone-panel:has(.phone-home) #close{background:#ffffff40;color:#536047;border-color:#83927230}
#panel.phone-panel:has(.phone-home) #close:hover{background:#dce2cf}
#panel.phone-panel .phone-home{background:radial-gradient(ellipse at 100% 0,#becba04d,transparent 65%),linear-gradient(145deg,#f4efdf,#e7e5d3);color:#344234}
#panel.phone-panel .phone-home-heading{border-bottom-color:#a8ae8940}
#panel.phone-panel .phone-home-heading small{color:#70795b;letter-spacing:.22em}
#panel.phone-panel .phone-clock{font-family:var(--phone-font);font-weight:300;letter-spacing:-3px;color:#364a38;text-shadow:none}
#panel.phone-panel .phone-night{color:#788062;border-color:#9ba98350}
#panel.phone-panel .phone-ep-card{border-radius:12px;border-color:#82916a;background:linear-gradient(125deg,#435c42,#2b4333);box-shadow:inset 0 1px #fff3,0 5px 14px #35472a20}
#panel.phone-panel .phone-ep-card::after{border-radius:8px;border-color:#e4d7aa1c}
#panel.phone-panel .phone-ep-card img{border-radius:5px;transform:rotate(-3deg)}
#panel.phone-panel .phone-ep-card strong{font-family:var(--phone-font);font-size:17px;line-height:1.3;font-weight:600;letter-spacing:0}
#panel.phone-panel .phone-ep-card small{font-family:var(--phone-font);color:#d0d4b4}
#panel.phone-panel .phone-home .phone-home-note{color:#72795f}
#panel.phone-panel .phone-apps button{border:1px solid #a2ab8580;border-radius:12px;background:linear-gradient(145deg,#fffdf1,#e6e8d6);box-shadow:inset 0 1px #fff,0 3px 0 #9fa78225,0 5px 10px #5263440b;color:#415238;font-family:var(--phone-font);font-weight:600;letter-spacing:0}
#panel.phone-panel .phone-apps button::before{inset:4px;border-radius:8px;border-color:#a4af8520}
#panel.phone-panel .phone-apps button::after{display:none}
#panel.phone-panel .phone-apps i,#panel.phone-panel .phone-apps :is(.app-messages,.app-notes,.app-music){color:#5e7650;filter:none;background:none}
#panel.phone-panel .phone-apps button:active{background:#d5dfc6;box-shadow:inset 0 2px 4px #62714b20}
#panel.phone-panel:has(.phone-home) .phone-home-bar{background:linear-gradient(#e8e7d6,#dcdFca);border-color:#b6c09c70;box-shadow:inset 0 1px #fff8}
#panel.phone-panel:has(.phone-home) .phone-home-button{border-color:#9ca883;background:linear-gradient(#faf8e9,#cfd8bd);box-shadow:inset 0 1px #fff,0 2px 4px #4e613020}
#panel.phone-panel:has(.phone-home) .phone-home-button::before{border-color:#74845d}
@media(hover:hover){
 #panel.phone-panel .phone-apps button:hover{background:linear-gradient(145deg,#fffef4,#edf0df);border-color:#809264;box-shadow:inset 0 1px #fff,0 4px 0 #9fa78225,0 7px 14px #52634412}
 #panel.phone-panel .phone-apps button:hover i{color:#3f6039;filter:none;transform:translateY(-1px)}
 #panel.phone-panel .phone-ep-card:hover{background:linear-gradient(125deg,#4c6748,#344e3b);border-color:#a9b582}
}
@media(max-height:570px){#panel.phone-panel .phone-ep-card strong{font-size:15px}}

/* Fit the home grid to the usable screen inside the handset. */
#panel.phone-panel #phone-screen:has(> .phone-home){container-type:size}
#panel.phone-panel .phone-home{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain}
@container (max-height: 640px){
 #panel.phone-panel .phone-home{padding:14px 20px;gap:12px}
 #panel.phone-panel .phone-home-heading{padding-bottom:8px}
 #panel.phone-panel .phone-clock{font-size:44px;margin-top:3px}
 #panel.phone-panel .phone-ep-card{min-height:0;padding:12px;gap:12px}
 #panel.phone-panel .phone-ep-card img{width:62px;height:62px}
 #panel.phone-panel .phone-apps{gap:8px}
 #panel.phone-panel .phone-apps button{min-height:76px;gap:4px;padding:7px}
 #panel.phone-panel .phone-apps i,#panel.phone-panel .phone-apps svg{width:34px;height:34px}
}
