:root{--ink:#342546;--muted:#63516f;--violet:#7450a9;--edge:#ffffffc7}*{box-sizing:border-box}body{margin:0;font-family:'Microsoft JhengHei','PingFang TC',sans-serif;color:var(--ink);min-height:100svh;background:linear-gradient(125deg,#d8c8ef 0%,#e7d8ee 45%,#f5d5d6 75%,#f7e0d1 100%);isolation:isolate}body:before{content:'';position:fixed;inset:0;z-index:-2;background:url(login-studio-bg.jpg) center/cover no-repeat;opacity:.22;filter:saturate(.7)}body:after{content:'';position:fixed;inset:0;z-index:-1;background:radial-gradient(ellipse at 23% 15%,#eee4ff95,transparent 60%),linear-gradient(90deg,#d9c7ee66,#f8dbde33);pointer-events:none}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #7450a9;outline-offset:4px}button{color:inherit}header{display:flex;justify-content:space-between;padding:23px 4vw;font-size:12px;letter-spacing:.08em}main{width:min(920px,94vw);margin:0 auto;display:grid;justify-items:center;padding:10px 0 36px}.brand{width:100%;text-align:center;position:relative}.brand h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#particles{display:block;width:100%;height:170px;touch-action:pan-y}.brand-sub{font-size:13px;letter-spacing:.28em;margin:-10px 0 7px;font-weight:500}.brand-hint{font-size:11px;color:var(--muted);margin:0 0 26px;letter-spacing:.07em}.glass{width:min(420px,90vw);position:relative;border-radius:28px;background:linear-gradient(130deg,#ffffff8c,#fff9ff42 48%,#fff1f460);border:1px solid var(--edge);box-shadow:inset 0 1px 0 #fff,inset 1px 0 0 #ffffff88,0 3px 0 #c6b3d455,0 7px 0 #aa8cbb16,0 24px 65px #79607e29;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);padding:33px 36px 30px;transform-style:preserve-3d;transform:perspective(1100px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .25s ease-out;overflow:hidden}.glass:before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle at var(--gx,18%) var(--gy,8%),#ffffff80,transparent 47%)}.glass:after{content:'';position:absolute;top:-65px;left:30px;width:130px;height:350px;transform:rotate(30deg);background:linear-gradient(90deg,transparent,#ffffff35,transparent);pointer-events:none}.form-inner{position:relative;z-index:1}.glass h2{font-size:23px;letter-spacing:.03em;margin:0 0 8px}.welcome{font-size:12px;color:var(--muted);margin:0 0 24px;line-height:1.7}label{display:block;font-size:12px;font-weight:600;margin:18px 0 9px}input{width:100%;border:1px solid #bca8cb82;background:#ffffff4f;border-radius:12px;color:var(--ink);height:49px;padding:0 14px;box-shadow:inset 0 2px 5px #7f668410}input::placeholder{color:#786783}input:focus{border-color:#8261b5;background:#ffffff96}.password{position:relative}.password input{padding-right:60px}.reveal{position:absolute;right:8px;top:9px;background:transparent;border:0;border-radius:6px;font-size:11px;padding:8px;color:#5d4674}.login{margin-top:27px;width:100%;border-radius:12px;padding:14px;border:1px solid #9876cbb5;background:linear-gradient(115deg,#7b58b1,#a77bc1);color:white;font-weight:600;font-size:14px;box-shadow:inset 0 1px 0 #ffffff65,0 7px 16px #79539528;transition:transform .18s,box-shadow .18s}.login:hover{transform:translateY(-2px);box-shadow:inset 0 1px 0 #ffffff65,0 11px 20px #79539538}.assist{font-size:11px;text-align:center;color:#63516f;margin:18px 0 0;line-height:1.7}.toast{min-height:18px;margin:10px 0 -4px;font-size:11px;text-align:center;color:#674087}footer{padding:13px 20px 22px;text-align:center;font-size:10px;letter-spacing:.08em;color:#695572}
@media(min-height:950px){main{padding-top:35px}#particles{height:200px}.brand-hint{margin-bottom:36px}.glass{padding-top:38px;padding-bottom:34px}}
@media(max-width:650px){header{padding:18px 5vw;font-size:10px}main{padding-top:5px}#particles{height:128px}.brand-sub{font-size:11px;letter-spacing:.22em;margin-top:-3px}.brand-hint{font-size:10px;margin-bottom:24px}.glass{padding:28px 26px;width:min(400px,90vw)}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}.brand-hint{visibility:hidden}}
.forgot-row{text-align:right;margin-top:10px}.forgot{border:0;background:transparent;font-size:11px;color:#674087;padding:5px 0;text-decoration:underline;text-underline-offset:3px}.login{margin-top:16px}.glass{margin-top:22px}.brand-sub{margin-bottom:22px}.recovery{width:min(420px,90vw);border:1px solid #fff;border-radius:24px;padding:28px;background:linear-gradient(130deg,#f4ecfb,#f9eff2);color:#342546;box-shadow:0 24px 70px #3c284b30}.recovery::backdrop{background:#49315b30;backdrop-filter:blur(7px)}.recovery h2{margin:0 0 10px;font-size:23px}.recovery p{font-size:12px;line-height:1.7;color:#63516f}.recovery .close{display:block;margin:15px auto 0;border:0;background:none;color:#674087;font-size:12px;padding:8px}.recovery-status{min-height:21px}.brand h1{font-family:Georgia,serif;font-weight:500}
@media(max-width:600px){#particles{display:none}.brand h1{position:static;clip-path:none;width:auto;height:auto;font-size:clamp(32px,9vw,48px);margin:30px 0 18px;letter-spacing:.015em}.brand-sub{margin-bottom:24px}.glass{margin-top:0;transform:none!important}.glass:before{background:linear-gradient(130deg,#ffffff50,transparent)}}
@media(min-width:601px) and (max-height:820px){#particles{height:132px}.glass{margin-top:10px;padding-top:25px;padding-bottom:24px}.brand-sub{margin-bottom:8px}}
/* 接入正式登入:送出中、錯誤訊息、重設頁 */
.login[disabled]{opacity:.72;cursor:wait;transform:none}
.toast.bad,.recovery-status.bad{color:#9c2f45}
.recovery-status{font-size:12px;line-height:1.7;color:#4f3a66;margin:12px 0 0}
.reset-account{font-weight:600;color:#4f3a66}
.back-login{display:block;text-align:center;margin-top:16px;font-size:12px;color:#674087;text-decoration:underline;text-underline-offset:3px}

/* 2026-10-13 業主調整:標題放大、登入面板縮短(移除下方說明) */
#particles{height:230px}
@media(min-height:950px){#particles{height:260px}}
@media(min-width:601px) and (max-height:820px){#particles{height:190px}}
.glass{padding-bottom:26px}
@media(max-width:600px){.brand h1{font-size:clamp(40px,12vw,58px)}}

/* 依控制台主題換色(登入前讀這台裝置上次選的主題;沒選過=薰衣草紫) */
:root{--p1:#67418e;--p2:#9b6592}
html[data-theme="milktea"]{--ink:#2A1D15;--muted:#6B4E40;--violet:#8E564C;--edge:#ffffffc7;--p1:#8E564C;--p2:#C08576}
html[data-theme="milktea"] body{background:linear-gradient(125deg,#F4E6E0 0%,#EBD3CA 50%,#E1C2B6 100%)}
html[data-theme="milktea"] body:after{background:radial-gradient(ellipse at 23% 15%,#fff3ee95,transparent 60%),linear-gradient(90deg,#f1ddd566,#e7c7bb33)}
html[data-theme="milktea"] .login{border-color:#a96f62b5;background:linear-gradient(115deg,#8E564C,#C08576);box-shadow:inset 0 1px 0 #ffffff65,0 7px 16px #8e564c30}
html[data-theme="milktea"] input{border-color:#b98d7f82}html[data-theme="milktea"] input:focus{border-color:#8E564C}
html[data-theme="milktea"] .forgot,html[data-theme="milktea"] .reveal,html[data-theme="milktea"] .recovery .close,html[data-theme="milktea"] .back-login{color:#7A4A41}
html[data-theme="milktea"] .recovery{background:linear-gradient(130deg,#fbf1ec,#f3e1d9)}
html[data-theme="ivory"]{--ink:#141414;--muted:#4a4640;--violet:#3A3631;--edge:#ffffffd9;--p1:#2c2925;--p2:#8C8170}
html[data-theme="ivory"] body{background:linear-gradient(125deg,#FFFDF8 0%,#F3EEE5 55%,#E9E2D5 100%)}
html[data-theme="ivory"] body:after{background:radial-gradient(ellipse at 23% 15%,#ffffffa0,transparent 60%),linear-gradient(90deg,#f6f2ea66,#e6ddcd33)}
html[data-theme="ivory"] body:before{filter:grayscale(.6);opacity:.16}
html[data-theme="ivory"] .login{border-color:#2a2622;background:linear-gradient(115deg,#1f1d1a,#4a453e);box-shadow:inset 0 1px 0 #ffffff40,0 7px 16px #1414142a}
html[data-theme="ivory"] input{border-color:#a99a8070}html[data-theme="ivory"] input:focus{border-color:#3A3631}
html[data-theme="ivory"] .forgot,html[data-theme="ivory"] .reveal,html[data-theme="ivory"] .recovery .close,html[data-theme="ivory"] .back-login{color:#3A3631}
html[data-theme="ivory"] .recovery{background:linear-gradient(130deg,#fffdf8,#f2ece2)}
html[data-theme="dark"]{--ink:#F6EFE3;--muted:#E9DCC3;--violet:#E4C77A;--edge:#e4c77a55;--p1:#E4C77A;--p2:#C9A24B}
html[data-theme="dark"] body{background:linear-gradient(125deg,#1E150E 0%,#150E09 55%,#0d0805 100%);color:var(--ink)}
html[data-theme="dark"] body:before{opacity:.12;filter:saturate(.4) brightness(.6)}
html[data-theme="dark"] body:after{background:radial-gradient(ellipse at 23% 15%,#c9a24b22,transparent 60%),linear-gradient(90deg,#00000033,#2a1d1533)}
html[data-theme="dark"] .glass{background:linear-gradient(130deg,#3a2a1ecc,#281c13b3 48%,#31231acc);border-color:#e4c77a40;box-shadow:inset 0 1px 0 #e4c77a33,0 3px 0 #00000055,0 24px 65px #00000066}
html[data-theme="dark"] .glass:before{background:radial-gradient(circle at var(--gx,18%) var(--gy,8%),#e4c77a22,transparent 47%)}
html[data-theme="dark"] .glass:after{background:linear-gradient(90deg,transparent,#e4c77a14,transparent)}
html[data-theme="dark"] input{background:#1e150e99;border-color:#e4c77a40;color:#F6EFE3}html[data-theme="dark"] input::placeholder{color:#B39B7A}html[data-theme="dark"] input:focus{border-color:#E4C77A;background:#1e150ecc}
html[data-theme="dark"] .login{border-color:#E4C77A;background:linear-gradient(115deg,#C9A24B,#E4C77A);color:#2A1D15;box-shadow:inset 0 1px 0 #ffffff55,0 7px 16px #00000055}
html[data-theme="dark"] .forgot,html[data-theme="dark"] .reveal,html[data-theme="dark"] .recovery .close,html[data-theme="dark"] .back-login,html[data-theme="dark"] .toast,html[data-theme="dark"] .recovery-status,html[data-theme="dark"] .reset-account{color:#E4C77A}
html[data-theme="dark"] .toast.bad,html[data-theme="dark"] .recovery-status.bad{color:#F4B3AA}
html[data-theme="dark"] .recovery{background:linear-gradient(130deg,#31231a,#281c13);color:#F6EFE3;border-color:#e4c77a55}html[data-theme="dark"] .recovery p{color:#E9DCC3}
html[data-theme="dark"] .welcome,html[data-theme="dark"] .brand-sub,html[data-theme="dark"] header{color:#E9DCC3}
html[data-theme="milktea"] input::placeholder{color:#8a6a5e}html[data-theme="ivory"] input::placeholder{color:#6b665e}
html[data-theme="milktea"] .glass{box-shadow:inset 0 1px 0 #fff,0 3px 0 #d9b9ad55,0 24px 65px #8e564c22}html[data-theme="ivory"] .glass{box-shadow:inset 0 1px 0 #fff,0 3px 0 #d6cdbd55,0 24px 65px #3a363122}
