/* ====== 视觉基底（已过审：蓝色梦核 / Win98 / 像素字） ====== */
:root{
  --win-bg:#c9d8ee;
  --win-dark:#3e5a94;
  --ink:#27406e;
  --pink:#e8a0c0;
  --title:#8fb0e0;
  --font-main:"Ark Pixel 12px Prop latin","Fusion Prop",monospace;
  --font-mono:"Fusion Mono","Fusion Prop",monospace;
  --font-jp:"DotGothic16","Fusion Prop",monospace;
}
*{box-sizing:border-box;}
html,body{height:100%;margin:0;overflow:hidden;}
body{
  font-family:var(--font-main);
  color:#eaf3ff;
  background:linear-gradient(180deg,#0b1230 0%,#1c2d5e 32%,#4a6db3 66%,#9cc0e8 96%);
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
#stage{position:fixed;inset:0;}
#stars{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated;pointer-events:none;}
.hidden{display:none !important;}

/* ====== BIOS ====== */
#bios{position:absolute;inset:0;background:#02040a;z-index:90;display:flex;align-items:center;justify-content:center;}
#bios pre{color:#9fe0a8;font-family:var(--font-mono);font-size:15px;line-height:1.7;white-space:pre-wrap;text-shadow:0 0 6px rgba(120,255,160,.5);}

/* ====== 桌面与图标 ====== */
#desktop{position:absolute;inset:0 0 36px 0;}
#icons{
  position:absolute;top:14px;left:14px;bottom:14px;
  display:flex;flex-direction:column;flex-wrap:wrap;gap:4px;align-content:flex-start;
}
.icon{
  width:86px;padding:8px 4px 6px;border:2px dashed transparent;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;
  position:relative;
}
.icon .glyph{
  font-size:30px;line-height:1;filter:drop-shadow(2px 2px 0 rgba(5,10,30,.55));
  width:44px;height:44px;display:grid;place-items:center;
  background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16);
}
.icon .label{
  font-size:12px;line-height:1.25;color:#fff;text-shadow:1px 1px 0 #1a2c55;
  word-break:break-all;max-width:80px;
}
.icon.sel{border-color:#cfe0f7;background:rgba(143,176,224,.28);border-style:dotted;}
.icon.pop{animation:pop .35s ease-out both;}
@keyframes pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}

/* ====== 窗口 ====== */
#win-layer{position:absolute;inset:0 0 36px 0;pointer-events:none;}
.win{
  position:absolute;pointer-events:auto;min-width:230px;background:var(--win-bg);
  border:2px solid #fff;
  box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff,5px 5px 0 rgba(5,10,30,.45);
}
.win .tbar{
  display:flex;align-items:center;gap:6px;padding:3px 4px 3px 7px;cursor:grab;
  background:linear-gradient(180deg,#a9c4ea,#7ea4d8 60%,#6f96cf);
  border-bottom:1px solid var(--win-dark);color:#fff;font-size:14px;
  text-shadow:1px 1px 0 #34528a;
}
.win .tbar .ttl{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.win .tbar .btns{display:flex;gap:3px;}
.win .tbar button{
  width:20px;height:18px;border:1px solid #34528a;background:#c9d8ee;color:#27406e;
  font-family:var(--font-mono);font-size:12px;line-height:1;cursor:pointer;padding:0;
}
.win .tbar button:active{transform:translate(1px,1px);}
.win .body{
  background:#e8f0fc;color:var(--ink);margin:3px;border:2px solid var(--win-dark);
  padding:10px 12px;font-size:13px;line-height:1.8;overflow:auto;
  max-height:calc(100vh - 130px);
}
.win.max{left:4px !important;top:4px !important;width:calc(100% - 8px) !important;height:calc(100% - 44px) !important;}
.win.max .body{max-height:none;height:calc(100% - 34px);}
.btn98{
  border:2px solid #fff;background:#c9d8ee;color:var(--ink);
  box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff;
  padding:3px 12px;font-family:var(--font-main);font-size:13px;cursor:pointer;margin:3px 4px 3px 0;
}
.btn98:active{box-shadow:inset 2px 2px 0 var(--win-dark),inset -2px -2px 0 #eef5ff;}
.btn98.primary{background:#dbe7fb;}
input.txt98,textarea.txt98,select.txt98{
  border:2px solid var(--win-dark);background:#fff;color:var(--ink);
  font-family:var(--font-main);font-size:13px;padding:4px 6px;width:100%;
}
textarea.txt98{resize:vertical;min-height:120px;line-height:1.7;}
.muted{color:#5b76a6;}
.hr{height:1px;background:#b9cbe8;margin:8px 0;}

/* ====== 任务栏 ====== */
#taskbar{
  position:absolute;left:0;right:0;bottom:0;height:36px;z-index:60;
  display:flex;align-items:center;gap:4px;padding:0 6px;
  background:linear-gradient(180deg,#b9cfee,#93b1dd 55%,#7fa1d3);
  border-top:2px solid #fff;box-shadow:0 -2px 0 var(--win-dark);
}
#tasks{display:flex;gap:4px;flex:1;overflow:hidden;}
.taskbtn{
  max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  border:2px solid #fff;background:#c9d8ee;color:#27406e;font-size:12px;padding:3px 9px;cursor:pointer;
  box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff;
}
.taskbtn.active{background:#dbe7fb;box-shadow:inset 2px 2px 0 var(--win-dark),inset -2px -2px 0 #eef5ff;}
#clock{
  font-family:var(--font-mono);font-size:15px;color:#1d3560;background:#cfe0f7;
  border:2px solid #fff;box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff;
  padding:2px 10px;
}
#clock.blink{animation:clk .9s ease;}
@keyframes clk{0%,100%{transform:scaleY(1)}35%{transform:scaleY(.35)}60%{transform:scaleY(1)}80%{transform:scaleY(.55)}}
#daywords{
  font-family:var(--font-main);font-size:11px;color:#33517f;background:#cfe0f7;
  border:2px solid #fff;box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff;
  padding:2px 8px;white-space:nowrap;
}
#daywords:empty{display:none;}
#startbtn{font-family:var(--font-main);font-size:13px;padding:3px 10px;border:2px solid #fff;background:#c9d8ee;box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff;color:#27406e;cursor:pointer;flex:0 0 auto;}
#startbtn:active{box-shadow:inset 2px 2px 0 var(--win-dark);}
#showdesk{flex:0 0 auto;width:30px;text-align:center;padding:3px 0;border:2px solid #fff;background:#c9d8ee;box-shadow:inset -2px -2px 0 var(--win-dark),inset 2px 2px 0 #eef5ff;color:#27406e;font-size:12px;cursor:pointer;}
#pomoMini{font-family:var(--font-mono);font-size:12px;background:#fbeef5;border:2px solid #fff;box-shadow:inset -2px -2px 0 #dc9db6;color:#8a4a68;padding:2px 8px;white-space:nowrap;}
#startmenu{position:absolute;left:6px;bottom:42px;z-index:85;width:330px;max-height:min(72vh,520px);overflow:auto;background:#e8f0fc;border:2px solid #fff;box-shadow:inset -2px -2px 0 var(--win-dark),4px 4px 0 rgba(5,10,30,.45);padding:6px;}
.sm-search{margin-bottom:6px;}
.sm-sec{margin:4px 0 2px;font-size:11px;color:#6d7ea8;padding:0 6px;}
.sm-item{display:flex;align-items:center;gap:8px;padding:6px 8px;cursor:pointer;font-size:13px;color:#27406e;}
.sm-item:hover{background:#8fb0e0;color:#fff;}
.sm-item .sm-g{font-size:16px;width:20px;text-align:center;}
.sm-item .sm-sub{margin-left:auto;font-size:10px;color:#8199bd;}
.sm-item:hover .sm-sub{color:#e4eefb;}
.sm-empty{font-size:12px;color:#8199bd;padding:8px;}
.help-h{font-size:13px;color:#2f4a76;margin:10px 0 4px;}
.help-h:first-child{margin-top:0;}
.help-p{font-size:12px;line-height:1.9;color:#4a5c78;}
.help-list{margin:0 0 4px 16px;padding:0;font-size:12px;line-height:2;color:#4a5c78;}

/* ====== 右键菜单 ====== */
#ctx{
  position:absolute;z-index:80;min-width:168px;background:#e8f0fc;color:var(--ink);
  border:2px solid #fff;box-shadow:inset -2px -2px 0 var(--win-dark),3px 3px 0 rgba(5,10,30,.45);
  padding:3px;font-size:13px;
}
#ctx .mi{padding:5px 12px;cursor:pointer;white-space:nowrap;}
#ctx .mi:hover{background:#8fb0e0;color:#fff;}
#ctx .sep{height:1px;background:#b9cbe8;margin:3px 6px;}

/* ====== 气球 / 成就 ====== */
#toasts{position:absolute;right:10px;bottom:44px;z-index:95;display:flex;flex-direction:column;gap:8px;align-items:flex-end;}
.toast{
  max-width:280px;background:#e8f0fc;color:var(--ink);border:2px solid #fff;
  box-shadow:inset -2px -2px 0 var(--win-dark),4px 4px 0 rgba(5,10,30,.4);
  padding:8px 12px;font-size:13px;line-height:1.6;animation:tin .3s ease-out;
}
.toast .th{font-size:12px;color:#7a5c1e;margin-bottom:2px;}
.toast .trophy{font-size:14px;}
@keyframes tin{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}

/* ====== 便签 ====== */
#sticky-layer{position:absolute;inset:0 0 36px 0;pointer-events:none;z-index:30;}
.sticky{
  position:absolute;width:170px;min-height:120px;pointer-events:auto;padding:20px 10px 10px;
  background:#fdf6b2;color:#4a3f1c;font-size:13px;line-height:1.6;
  box-shadow:3px 3px 0 rgba(5,10,30,.35);border:1px solid #d8c96a;user-select:text;
  outline:none;white-space:pre-wrap;word-break:break-word;
}
.sticky .bar{
  position:absolute;left:0;top:0;right:0;height:18px;display:flex;align-items:center;gap:4px;
  padding:0 4px;cursor:grab;background:rgba(0,0,0,.06);font-size:11px;
}
.sticky .dot{width:8px;height:8px;border-radius:0;border:1px solid rgba(0,0,0,.25);cursor:pointer;}
.sticky .x{margin-left:auto;cursor:pointer;font-family:var(--font-mono);padding:0 3px;}
.sticky.yellow{background:#fdf6b2;border-color:#d8c96a;color:#4a3f1c;}
.sticky.blue{background:#cfe6fb;border-color:#83b3dd;color:#1d3a57;}
.sticky.pink{background:#fbd7e6;border-color:#dc9db6;color:#5a2340;}
.sticky.white{background:#ffffff;border-color:#c9cfda;color:#333;}
.sticky.black{background:#2b2f3d;border-color:#151824;color:#e8eef8;}

/* ====== 列表 ====== */
.filelist{list-style:none;margin:0;padding:0;}
.filelist li{display:flex;align-items:center;gap:8px;padding:4px 6px;cursor:default;}
.filelist li:hover{background:#d7e4f7;}
.filelist .fg{font-size:17px;}
.ach{display:flex;gap:10px;align-items:flex-start;padding:7px 8px;border-bottom:1px dashed #b9cbe8;}
.ach .ai{font-size:20px;filter:grayscale(1);opacity:.45;}
.ach.unlocked .ai{filter:none;opacity:1;}
.ach .an{font-size:13px;}
.ach.locked .an{color:#8199bd;}
.badge{font-family:var(--font-mono);font-size:12px;background:#34528a;color:#cfe0f7;padding:0 5px;}

/* ====== LETTERS.EXE ====== */
.menubar{
  display:flex;gap:2px;background:#d4e1f4;border-bottom:1px solid #9db7dd;
  margin:-10px -12px 10px;padding:2px 4px;font-size:13px;
}
.menubar span{padding:2px 10px;cursor:pointer;color:#27406e;}
.menubar span:hover{background:#8fb0e0;color:#fff;}
.mailbox{display:flex;flex-direction:column;gap:2px;}
.env{display:flex;align-items:center;gap:10px;padding:7px 8px;cursor:pointer;border:1px solid transparent;}
.env:hover{background:#d7e4f7;border-color:#b9cbe8;}
.env .eg{font-size:23px;}
.env .em{flex:1;}
.env .en{font-size:14px;}
.env .ed{font-size:12px;}
.env .es{font-size:15px;color:#b3588a;}

.letter-paper{position:relative;background:#fffdf7;border:1px solid #e4d9c5;padding:20px 16px 14px;box-shadow:2px 2px 0 rgba(30,40,70,.12);}
.tape{position:absolute;left:50%;top:-8px;width:80px;height:18px;background:rgba(232,160,192,.55);transform:translateX(-50%) rotate(-2deg);border-left:1px dashed rgba(255,255,255,.75);border-right:1px dashed rgba(255,255,255,.75);}
.lp-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:6px;}
.lp-title{font-size:15px;color:#5a3b2e;line-height:1.5;padding-top:4px;}
.lp-stamp{
  width:62px;height:76px;flex:0 0 auto;border:2px dashed #c9a7b8;display:grid;place-items:center;
  font-size:11px;color:#b58aa2;background:#fff8fb;text-align:center;line-height:1.35;padding:2px;
}
.lp-stamp.has{font-size:19px;color:#8a4a68;background:#fff2f8;}
.lp-lines{
  background:repeating-linear-gradient(180deg,transparent 0 26px,#f6cfe0 26px 27px);
  line-height:27px;font-size:13px;color:#463a30;padding-top:2px;
}
.lp-lines p{margin:0 0 27px;}
.lp-lines p:last-child{margin-bottom:0;}
.lp-lines .jp{font-family:var(--font-jp);font-size:13px;letter-spacing:1px;color:#8a5f7a;}
.lp-stickers{font-size:17px;letter-spacing:5px;margin:10px 0 2px;}
.lp-sig{text-align:right;font-size:13px;color:#6a564a;}
.ps-zone{margin-top:14px;border-top:2px dashed #f0b8cf;padding-top:8px;}
.ps-head{font-size:13px;color:#b3588a;margin-bottom:6px;}
.psrow{display:flex;gap:8px;align-items:baseline;font-size:12px;padding:3px 0;color:#54432f;border-bottom:1px dotted #eadfce;}
.ps-in{display:flex;gap:6px;margin-top:8px;align-items:center;}
.lp-back{margin-top:10px;text-align:right;}

/* ====== DRAWERS.EXE ====== */
.cabinet{background:#b9cbe8;border:2px solid var(--win-dark);padding:10px;display:flex;flex-direction:column;gap:8px;}
.drawer{background:#e8eef8;border:2px solid #fff;box-shadow:inset -2px -2px 0 #9db7dd,inset 2px 2px 0 #fff;padding:6px 8px;cursor:pointer;}
.drawer .dhandle{display:flex;align-items:center;gap:8px;font-size:13px;color:#35507e;}
.drawer .dnum{font-family:var(--font-mono);background:#34528a;color:#cfe0f7;padding:0 6px;}
.drawer .dbody{max-height:0;overflow:hidden;transition:max-height .28s ease;}
.drawer.open .dbody{max-height:140px;}
.drawer .ditem{display:flex;gap:10px;padding:9px 2px 3px;align-items:flex-start;}
.drawer .de{font-size:22px;}
.drawer .dt{font-size:13px;color:#2f4a76;margin-bottom:2px;}
.drawer .dx{font-size:12px;line-height:1.7;color:#5b76a6;}
.drawer.locked{opacity:.78;}
.drawer.locked .dhandle{color:#7a86a0;}
.drawer.unlocked{background:#fbeef5;box-shadow:inset -2px -2px 0 #dc9db6,inset 2px 2px 0 #fff;}
.nestbase{margin:8px 2px 6px;height:46px;border-radius:50%;background:#aab0bc;border:2px solid #878d9a;position:relative;overflow:hidden;box-shadow:inset 0 6px 0 rgba(255,255,255,.25);}
.nestbase .zipper{position:absolute;left:10%;right:10%;top:52%;height:2px;background:repeating-linear-gradient(90deg,#e8ebf0 0 4px,transparent 4px 7px);}
.nestbase .nlab{position:absolute;left:0;right:0;bottom:3px;text-align:center;font-size:10px;color:#4c5563;letter-spacing:1px;}
.drawer .dc{font-size:12px;color:#8a4a68;margin-top:4px;}
.drawer .dcq{background:#f2a8b4;color:#5a2340;padding:0 6px;font-family:var(--font-mono);}

/* ====== 记事本 ====== */
.np-area{height:310px;}
.np-status{display:flex;justify-content:space-between;font-size:11px;color:#5b76a6;border-top:1px solid #b9cbe8;margin-top:6px;padding-top:4px;font-family:var(--font-mono);}

/* ====== 桌面宠物 ====== */
.pet{position:absolute;left:0;top:0;z-index:6;cursor:grab;touch-action:none;will-change:transform;filter:drop-shadow(3px 3px 0 rgba(5,10,30,.35));}
.pet.dragging{cursor:grabbing;}
.pet.dragging .sprite{filter:drop-shadow(0 8px 6px rgba(0,0,0,.35));}
.pet-need{position:absolute;right:-10px;top:-18px;font-size:15px;pointer-events:none;filter:drop-shadow(0 1px 0 rgba(5,10,30,.5));animation:needFloat 2.4s ease-in-out infinite;}
@keyframes needFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
.pet .sprite{display:block;transform-origin:50% 100%;}
.pet canvas{display:block;image-rendering:pixelated;}
.pet .zzz{display:none;position:absolute;right:-16px;top:-14px;color:#dce9ff;font-family:var(--font-mono);font-size:14px;animation:zz 2.4s infinite;pointer-events:none;}
.pet.sleep .zzz{display:block;}
@keyframes zz{0%{transform:translateY(2px);opacity:.2}40%{opacity:1}100%{transform:translateY(-10px);opacity:0}}
.pet-bubble{position:absolute;z-index:7;transform:translate(-50%,-100%);background:#e8f0fc;color:#27406e;border:2px solid #fff;box-shadow:inset -2px -2px 0 #3e5a94,3px 3px 0 rgba(5,10,30,.4);padding:4px 9px;font-size:12px;white-space:nowrap;pointer-events:none;animation:tin .2s ease-out;}
.heart{position:absolute;z-index:7;font-size:14px;pointer-events:none;animation:heartUp 1.2s ease-out forwards;}
@keyframes heartUp{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-46px)}}
.spark{position:absolute;z-index:7;font-size:14px;pointer-events:none;animation:heartUp 1.6s ease-out forwards;}
.parcel{position:absolute;z-index:4;display:flex;flex-direction:column;align-items:center;cursor:pointer;user-select:none;animation:pop .25s ease-out;}
.parcel .pglyph{font-size:32px;filter:drop-shadow(0 2px 0 rgba(5,10,30,.35));animation:parcelBob 2.4s ease-in-out infinite;}
.parcel .plabel{font-family:var(--font-main);font-size:10px;color:#dbe7fb;background:rgba(10,18,44,.55);border:1px solid rgba(255,255,255,.35);padding:0 5px;margin-top:2px;white-space:nowrap;}
.parcel:active .pglyph{transform:scale(.92);}
.parcel:focus-visible{outline:2px dashed #ffe9a8;outline-offset:4px;}
@keyframes parcelBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media (prefers-reduced-motion: reduce){.parcel .pglyph{animation:none}}

/* ====== CATCH.EXE ====== */
.catch-wrap{font-size:13px;}
.catch-hud{display:flex;justify-content:space-between;align-items:center;background:#d4e1f4;border:1px solid #9db7dd;padding:4px 8px;font-family:var(--font-mono);font-size:13px;margin-bottom:6px;}
.catch-canvas{width:100%;border:2px solid var(--win-dark);background:#dce9fb;image-rendering:pixelated;cursor:crosshair;display:block;touch-action:none;}
.catch-foot{display:flex;gap:10px;align-items:center;margin-top:8px;flex-wrap:wrap;}
.catch-foot .muted{font-size:12px;}

/* ====== BGM.MP3 ====== */
.bgm-now{display:flex;gap:10px;align-items:center;background:#d4e1f4;border:1px solid #9db7dd;padding:8px;margin-bottom:8px;}
.bgm-disc{font-size:26px;animation:spin 6s linear infinite;}
@keyframes spin{to{transform:rotate(360deg)}}
.bgm-t{font-size:14px;}
.bgm-st{font-size:12px;}
.bgm-list{list-style:none;margin:0 0 8px;padding:0;border:1px solid #b9cbe8;background:#fff;max-height:150px;overflow:auto;}
.bgm-list li{padding:5px 8px;cursor:pointer;font-size:12px;border-bottom:1px dotted #dfe8f5;}
.bgm-list li:hover{background:#e4eefb;}
.bgm-list li.cur{background:#d7e4f7;color:#1d3a57;}
.bgm-ctrl{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.bgm-loop{font-size:12px;display:flex;align-items:center;gap:4px;margin-left:4px;color:#35507e;}
.bgm-vol{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:12px;}
.bgm-vol input{flex:1;accent-color:#5b8fd0;}
.bgm-time{font-family:var(--font-mono);font-size:11px;}

/* ====== 彩蛋扩展 ====== */
.meteor{position:absolute;z-index:5;font-size:16px;cursor:pointer;filter:drop-shadow(0 0 6px rgba(200,230,255,.85));animation:meteorFly 2.8s linear forwards;}
@keyframes meteorFly{from{transform:translate(0,0)}to{transform:translate(120vw,55vh)}}
#starrain{position:fixed;inset:0;pointer-events:none;z-index:88;overflow:hidden;}
.rainstar{position:absolute;top:-24px;animation:rainFall linear forwards;}
@keyframes rainFall{to{transform:translateY(105vh)}}
#screensaver{position:fixed;inset:0;z-index:97;background:#040815;}
#screensaver canvas{display:block;width:100%;height:100%;}
#screensaver .ss-tip{position:absolute;bottom:18px;left:0;right:0;text-align:center;font-size:12px;color:#6d7ea8;}
#ending{position:fixed;inset:0;z-index:98;background:#040815;cursor:pointer;}
#ending canvas{position:absolute;inset:0;width:100%;height:100%;}
.end-text{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%);font-size:46px;color:#ffe9f1;text-shadow:0 0 14px #f2a8b4,4px 4px 0 #6a2f4a;letter-spacing:2px;text-align:center;line-height:1.35;}
.end-sub{position:absolute;left:50%;top:58%;transform:translate(-50%,-50%);font-size:13px;color:#9fc0e8;text-align:center;width:82%;line-height:2;}
.end-tip{position:absolute;bottom:22px;left:0;right:0;text-align:center;font-size:11px;color:#5b76a6;}
.icon.ghost{position:fixed;z-index:90;opacity:.78;pointer-events:none;border-color:#cfe0f7;background:rgba(143,176,224,.18);}
#marquee{position:fixed;z-index:20;border:1px dashed #cfe0f7;background:rgba(143,176,224,.16);pointer-events:none;}
.icon.nope{animation:nope .45s ease;}
@keyframes nope{0%,100%{transform:none}20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
.pet.shake .sprite{animation:petShake .5s ease;}
@keyframes petShake{0%,100%{transform:rotate(0)}25%{transform:rotate(-7deg)}50%{transform:rotate(7deg)}75%{transform:rotate(-3deg)}}
.pet-letter{white-space:pre-wrap;font-size:13px;line-height:2;background:#fffdf7;border:1px dashed #e8c3d3;padding:12px 14px;color:#4a3b30;}
.pet-food{position:absolute;z-index:7;font-size:16px;pointer-events:none;animation:feedFall .85s ease-in forwards;}
@keyframes feedFall{0%{transform:translateY(-26px) scale(.6);opacity:0}25%{opacity:1}100%{transform:translateY(12px) scale(.95);opacity:0}}

/* ====== 计算器 ====== */
.calc{font-family:var(--font-mono);}
.calc-screen{background:#eaf6e6;border:2px inset #9db7dd;border-color:#7f96b5 #fff #fff #7f96b5;font-size:22px;color:#1f3b2a;text-align:right;padding:8px 10px;margin-bottom:8px;overflow:hidden;min-height:44px;word-break:break-all;}
.calc-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;}
.calc-k{padding:8px 0;font-family:var(--font-mono);font-size:15px;margin:0;}
.calc-k.eq{background:#dbe7fb;}
.calc-k.cl{color:#7a2f4a;}

/* ====== 提示卡 / 隐藏信 / 清理 ====== */
.hintcard{background:#fffdf7;border:1px dashed #e8c3d3;padding:12px 14px;font-size:13px;line-height:2;color:#4a3b30;}
.hidden-letter p{margin:0 0 12px;font-size:13px;line-height:2;color:#4a3b30;}
.hidden-letter{border-left:3px solid #e8a0c0;padding-left:12px;}
.clean-bar{height:16px;border:2px solid var(--win-dark);background:#fff;position:relative;margin:8px 0 4px;}
.clean-bar-in{position:absolute;inset:1px auto 1px 1px;width:0;background:repeating-linear-gradient(90deg,#5b8fd0 0 8px,#9cc0e8 8px 16px);transition:width .12s;}
.clean-done{font-size:13px;line-height:2;}
.errbox{display:flex;gap:12px;align-items:flex-start;}
.err-ico{font-size:28px;}
.shake-win{animation:nope .45s ease;}
.scratch{font-size:12px;filter:drop-shadow(1px 1px 0 rgba(0,0,0,.2));}
.icon.hf{opacity:.55;filter:blur(.3px);}
.egglist{list-style:none;margin:2px 0 0;padding:0;font-size:12px;color:#8199bd;}
.egglist li{padding:2px 0;}
.egglist li.on{color:#27406e;}

/* 兔爪指针（ACHIEVE 集满一页后解锁） */
body.paw, body.paw * {cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg fill='%23f0a8b8' stroke='%235a2340' stroke-width='1'%3E%3Cellipse cx='13' cy='16' rx='6' ry='5'/%3E%3Cellipse cx='6' cy='9' rx='2.4' ry='3'/%3E%3Cellipse cx='20' cy='9' rx='2.4' ry='3'/%3E%3Cellipse cx='13' cy='6.5' rx='2.4' ry='3'/%3E%3C/g%3E%3C/svg%3E") 13 20, auto !important;}
body.paw input, body.paw textarea{cursor:text !important;}

/* ====== 指针皮肤 ====== */
body[data-cursor="rabbit"] * {cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cg fill='%23f2b4c0' stroke='%235a2340' stroke-width='1.2'%3E%3Cellipse cx='14' cy='18' rx='6.5' ry='5.5'/%3E%3Cellipse cx='7' cy='10' rx='2.6' ry='3.4'/%3E%3Cellipse cx='21' cy='10' rx='2.6' ry='3.4'/%3E%3Cellipse cx='14' cy='7' rx='2.6' ry='3.4'/%3E%3C/g%3E%3C/svg%3E") 14 22, auto !important;}
body[data-cursor="dog"] * {cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cg fill='%23c98a5a' stroke='%233a2415' stroke-width='1.2'%3E%3Cellipse cx='14' cy='18.5' rx='6' ry='5'/%3E%3Cellipse cx='6' cy='10' rx='2.2' ry='2.9'/%3E%3Cellipse cx='11' cy='7.5' rx='2.2' ry='2.9'/%3E%3Cellipse cx='17' cy='7.5' rx='2.2' ry='2.9'/%3E%3Cellipse cx='22' cy='10' rx='2.2' ry='2.9'/%3E%3C/g%3E%3C/svg%3E") 14 22, auto !important;}
body[data-cursor="cat"] * {cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cg fill='%23d9d3e8' stroke='%233a3150' stroke-width='1.2'%3E%3Cellipse cx='14' cy='18.5' rx='6' ry='5'/%3E%3Cellipse cx='7' cy='10' rx='2.4' ry='3.2'/%3E%3Cellipse cx='14' cy='7.5' rx='2.4' ry='3.2'/%3E%3Cellipse cx='21' cy='10' rx='2.4' ry='3.2'/%3E%3C/g%3E%3C/svg%3E") 14 22, auto !important;}
body[data-cursor]:not([data-cursor="default"]) input,
body[data-cursor]:not([data-cursor="default"]) textarea{cursor:text !important;}
/* 桌宠始终保留“可抓 / 正在抓”的手感，不被皮肤盖掉 */
body[data-cursor]:not([data-cursor="default"]) .pet{cursor:grab !important;}
body[data-cursor]:not([data-cursor="default"]) .pet.dragging{cursor:grabbing !important;}
.pet:hover{filter:drop-shadow(3px 3px 0 rgba(5,10,30,.35)) drop-shadow(0 0 6px rgba(255,233,168,.6));}

/* ====== 控制面板 ====== */
.ctrl-sec{border-bottom:1px dashed #b9cbe8;padding-bottom:10px;margin-bottom:10px;}
.ctrl-sec:last-child{border-bottom:none;margin-bottom:0;}
.ctrl-h{font-size:13px;color:#2f4a76;margin-bottom:6px;}
.ctrl-row{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:12px;}
.ctrl-row .muted{width:64px;flex:0 0 auto;}
.cursor-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;}
.cursor-card{display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 3px;border:2px solid #fff;background:#e8eef8;box-shadow:inset -2px -2px 0 #9db7dd;cursor:pointer;font-family:var(--font-main);font-size:11px;color:#27406e;}
.cursor-card.on{background:#d7e4f7;box-shadow:inset 2px 2px 0 #9db7dd;}
.cursor-ico{width:26px;height:26px;display:block;background:no-repeat center/contain;}
.cursor-ico-default{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M6 2l12 11-6 .8 3 6-2.6 1.2-3-6L5 19z' fill='%23fff' stroke='%2327406e'/%3E%3C/svg%3E");}
.cursor-ico-rabbit{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='%23f2b4c0' stroke='%235a2340'%3E%3Cellipse cx='12' cy='16' rx='6' ry='5'/%3E%3Cellipse cx='5.5' cy='8.5' rx='2.4' ry='3.2'/%3E%3Cellipse cx='18.5' cy='8.5' rx='2.4' ry='3.2'/%3E%3Cellipse cx='12' cy='6' rx='2.4' ry='3.2'/%3E%3C/g%3E%3C/svg%3E");}
.cursor-ico-dog{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='%23c98a5a' stroke='%233a2415'%3E%3Cellipse cx='12' cy='16.5' rx='5.4' ry='4.6'/%3E%3Cellipse cx='4.8' cy='9' rx='2' ry='2.7'/%3E%3Cellipse cx='9.2' cy='6.8' rx='2' ry='2.7'/%3E%3Cellipse cx='14.8' cy='6.8' rx='2' ry='2.7'/%3E%3Cellipse cx='19.2' cy='9' rx='2' ry='2.7'/%3E%3C/g%3E%3C/svg%3E");}
.cursor-ico-cat{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='%23d9d3e8' stroke='%233a3150'%3E%3Cellipse cx='12' cy='16.5' rx='5.4' ry='4.6'/%3E%3Cellipse cx='5.5' cy='8.5' rx='2.2' ry='3'/%3E%3Cellipse cx='12' cy='6.2' rx='2.2' ry='3'/%3E%3Cellipse cx='18.5' cy='8.5' rx='2.2' ry='3'/%3E%3C/g%3E%3C/svg%3E");}
.pp-block{margin-bottom:8px;font-size:12px;}
.pp-title{margin-bottom:3px;color:#2f4a76;}
.pp-list{list-style:none;margin:0 0 5px;padding:0;max-height:150px;overflow:auto;}
.pp-list li{padding:2px 4px;border-bottom:1px dotted #dfe8f5;}
.pp-def{color:#6d7ea8;display:flex;gap:4px;align-items:center;}
.pp-def .pp-edit{flex:1;min-width:0;font-size:12px;padding:2px 6px;}
.acc-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:4px 0 8px;}
.avatar{width:48px;height:48px;border:2px solid #fff;box-shadow:inset -2px -2px 0 #9db7dd;object-fit:cover;display:inline-grid;place-items:center;font-size:24px;background:#dbe7fb;}
.acc-line{display:flex;gap:10px;align-items:center;margin-bottom:8px;}
.wp-prev{height:84px;border:2px solid #fff;box-shadow:inset -2px -2px 0 #9db7dd;margin:4px 0;background-size:cover;background-position:center;}
.update-note{position:fixed;right:14px;top:14px;z-index:120;width:220px;padding:9px 11px;background:#e8f0fc;color:#27406e;border:2px solid #fff;box-shadow:inset -2px -2px 0 #3e5a94,4px 4px 0 rgba(5,10,30,.45);font-size:12px;line-height:1.7;animation:tin .25s ease-out;}
.update-note .btn98{margin-top:5px;}
#updateChip{font-family:var(--font-main);font-size:11px;color:#5a2340;background:#fdf3b8;border:2px solid #fff;box-shadow:inset -2px -2px 0 #d9b44a,inset 2px 2px 0 #fffdf0;padding:2px 7px;white-space:nowrap;cursor:pointer;animation:updatePulse 2.4s ease-in-out infinite;}
@keyframes updatePulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.15)}}
.pp-x{cursor:pointer;color:#a03a5d;background:none;border:none;font-family:var(--font-mono);}
.pp-add{display:flex;gap:6px;align-items:center;}

/* ====== 番茄钟 ====== */
.pomo{text-align:center;font-family:var(--font-mono);}
.pomo-phase{font-size:13px;color:#5a3b4a;}
.pomo-time{font-size:54px;color:#2f4a76;letter-spacing:3px;margin:2px 0 6px;}
.pomo-bar{height:14px;border:2px solid var(--win-dark);background:#fff;position:relative;margin-bottom:8px;}
.pomo-bar-in{position:absolute;inset:1px auto 1px 1px;width:0;background:repeating-linear-gradient(90deg,#f2a8b4 0 8px,#f7c3d0 8px 16px);}
.pomo-ctrl{margin-bottom:6px;}
.pomo-set{display:flex;gap:6px;justify-content:center;align-items:center;font-size:12px;}
.pomo-set input{width:52px;font-family:var(--font-mono);}

/* ====== 日记本 ====== */
.jrn{display:flex;gap:10px;min-height:320px;}
.jrn-list{width:190px;flex:0 0 auto;display:flex;flex-direction:column;}
.jrn-tools{display:flex;gap:4px;flex-wrap:wrap;}
.jrn-tools .btn98{font-size:11px;padding:2px 6px;}
.jrn-entries{list-style:none;margin:0;padding:0;overflow:auto;flex:1;border:1px solid #b9cbe8;background:#fff;}
.jrn-entries li{padding:6px 8px;border-bottom:1px dotted #dfe8f5;cursor:pointer;}
.jrn-entries li:hover{background:#e4eefb;}
.jrn-entries li.cur{background:#d7e4f7;}
.je-t{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.je-d{font-size:10px;}
.jrn-edit{flex:1;display:flex;flex-direction:column;gap:5px;}
.jrn-title{font-size:14px;}
.jrn-meta{font-size:11px;display:flex;gap:8px;}
.jrn-text{min-height:210px;flex:1;line-height:1.9;}
.jrn-bottom{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.jrn-tags{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:4px;}
.tagchip{font-size:10px;background:#d7e4f7;color:#35507e;padding:0 6px;cursor:pointer;border:1px solid #b9cbe8;white-space:nowrap;}
.tagchip.on{background:#34528a;color:#cfe0f7;}
.je-s{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.je-tag{font-size:9px;color:#8a4a68;}
.jrn-filterbar{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin-bottom:4px;font-size:11px;}
.jrn-tags-input{font-size:11px;}
.cal-head{display:flex;align-items:center;gap:6px;font-size:12px;margin:2px 0 4px;}
.cal-head .btn98{padding:0 6px;font-size:11px;margin:0;}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:10px;color:#8199bd;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;}
.cal-cell{background:#fff;border:1px solid #dfe8f5;min-height:26px;display:flex;align-items:center;justify-content:center;position:relative;font-size:11px;cursor:pointer;}
.cal-cell.empty{background:transparent;border:none;cursor:default;}
.cal-cell.has{background:#fbeef5;border-color:#ecc9da;}
.cal-cell.cur{outline:2px solid #8fb0e0;}
.cal-cell .cd-dot{position:absolute;right:3px;bottom:2px;font-size:8px;color:#8a4a68;}
mark{background:#ffe9f1;color:#a03a5d;}

/* ====== 数据统计 ====== */
.stats{font-size:12px;}
.stat-sec{margin-bottom:8px;}
.stat-h{font-size:13px;color:#2f4a76;margin-bottom:4px;}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;}
.stat{background:#fff;border:1px solid #b9cbe8;padding:6px 8px;}
.stat .sv{font-family:var(--font-mono);font-size:15px;color:#27406e;word-break:break-all;}
.stat .sl{font-size:11px;color:#6d7ea8;line-height:1.5;}

.rank{margin-top:8px;border-top:1px dashed #b9cbe8;padding-top:6px;font-size:11px;}
.rank-h{color:#2f4a76;margin-bottom:3px;}
.rank ol{list-style:none;margin:0;padding:0;}
.rank li{display:flex;gap:6px;align-items:center;padding:1px 0;border-bottom:1px dotted #dfe8f5;}
.rank li b{font-family:var(--font-mono);color:#8a4a68;width:14px;}
.rank li .muted{margin-left:auto;font-size:10px;}

/* ====== 数独加载 / 纸牌教程 / 24 点 ====== */
.sudo-loading{min-height:240px;display:grid;place-items:center;color:#8199bd;font-size:13px;border:2px dashed #b9cbe8;background:#f6f9fd;}
.sol-help p{font-size:12px;line-height:1.95;margin:0 0 8px;color:#4a5c78;}
.cards24{display:flex;gap:10px;justify-content:center;margin:10px 0;}
.card24{width:62px;height:86px;background:#fffdf7;border:1px solid #9db7dd;box-shadow:2px 2px 0 rgba(30,40,70,.18);display:flex;flex-direction:column;justify-content:space-between;padding:4px 6px;font-family:var(--font-mono);font-size:20px;color:#27406e;}
.card24 .s{align-self:flex-end;font-size:16px;}
.card24.red{color:#b0303f;}
.g24 .mono{font-family:var(--font-mono);}
.bdcake{font-size:62px;text-align:center;line-height:1.2;}
.bdcandles{font-size:24px;text-align:center;letter-spacing:8px;margin:4px 0 2px;}

/* ====== 游戏中心 ====== */
.ghub{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.gcard{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px;border:2px solid #fff;background:#e8eef8;box-shadow:inset -2px -2px 0 #9db7dd;cursor:pointer;font-family:var(--font-main);font-size:13px;color:#27406e;text-align:left;}
.gcard:hover{background:#d7e4f7;}
.gcard .gi{font-size:22px;}
.gcard.disabled{opacity:.6;}
.gbar{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;margin-bottom:6px;flex-wrap:wrap;}
.gdiff{display:flex;gap:4px;flex-wrap:wrap;}
.gdiff .btn98{font-size:11px;padding:2px 7px;margin:0;}
.g2048-grid{display:grid;gap:5px;background:#b9cbe8;padding:6px;border:2px solid var(--win-dark);}
.g2048-cell{aspect-ratio:1;display:grid;place-items:center;background:#dfe8f5;font-family:var(--font-mono);font-size:14px;color:#27406e;}
.g2048-cell.v2{background:#e8f0fc;}
.g2048-cell.v4{background:#d9e6f9;}
.g2048-cell.v8{background:#cfe0f7;}
.g2048-cell.v16{background:#c2d6f4;}
.g2048-cell.v32{background:#b3c9ef;}
.g2048-cell.v64{background:#a3bcea;}
.g2048-cell.v128{background:#8fb0e0;font-size:13px;color:#fff;}
.g2048-cell.v256{background:#7a9fd8;color:#fff;}
.g2048-cell.v512{background:#6a8fd0;color:#fff;}
.g2048-cell.v1024{background:#5b8fd0;font-size:12px;color:#fff;}
.g2048-cell.v2048{background:#e8a0c0;color:#fff;}
.g2048-cell.v4096{background:#d97aa8;color:#fff;}
.mine-canvas{max-width:100%;height:auto;display:block;margin:0 auto;image-rendering:pixelated;border:2px solid var(--win-dark);cursor:pointer;}
.sudo{border-collapse:collapse;margin:0 auto;}
.sudo td{border:1px solid #b9cbe8;padding:0;}
.sudo td.br{border-right:2px solid var(--win-dark);}
.sudo td.bb{border-bottom:2px solid var(--win-dark);}
.sudo input{width:30px;height:32px;border:none;text-align:center;font-family:var(--font-mono);font-size:15px;color:#27406e;background:#fff;outline:none;}
.sudo input.given{background:#e4eefb;color:#5b76a6;}
.sudo input.bad{background:#fbd7e6;color:#a03a5d;}
.sudo input.ok{color:#2f8a4a;}
.bgm-list li{display:flex;align-items:center;gap:6px;}
.bgm-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bgm-trash{cursor:pointer;color:#a03a5d;font-family:var(--font-mono);padding:0 4px;}

/* ====== 纸牌 · 克朗代克 ====== */
.gsol{font-size:12px;}
.sol-top{display:flex;gap:8px;margin-bottom:10px;align-items:flex-start;}
.sol-slot{width:56px;height:76px;border:2px dashed #9db7dd;background:rgba(255,255,255,.45);position:relative;display:grid;place-items:center;color:#5b76a6;flex:0 0 auto;}
.sol-slot.stock{cursor:pointer;border-style:solid;background:#c9d8ee;font-size:20px;}
.sol-slot.found{cursor:pointer;}
.sol-gap{flex:1;}
.sol-slot .sol-card{position:absolute;inset:0;width:auto;height:auto;margin:0;}
.sol-cols{display:flex;gap:8px;align-items:flex-start;min-height:300px;}
.sol-col{width:56px;min-height:300px;position:relative;}
.sol-card{position:absolute;left:0;width:52px;height:72px;background:#fffdf7;border:1px solid #9db7dd;box-shadow:1px 1px 0 rgba(30,40,70,.22);display:flex;flex-direction:column;justify-content:space-between;padding:3px 4px;font-family:var(--font-mono);font-size:14px;cursor:pointer;color:#27406e;box-sizing:border-box;}
.sol-card .scs{align-self:flex-end;}
.sol-card.red{color:#b0303f;}
.sol-card.back{background:repeating-linear-gradient(45deg,#7ea4d8 0 6px,#6f96cf 6px 12px);}
.sol-card.sel{outline:2px solid #f2a8b4;outline-offset:-2px;}
.sol-ph{font-size:22px;color:#9db7dd;}

/* ====== 触屏 / 小屏适配 ====== */
body{touch-action:manipulation;}
@media (max-width: 640px){
  #taskbar{height:42px;padding:0 4px;gap:3px;}
  #startbtn{font-size:12px;padding:3px 7px;}
  #clock{font-size:13px;padding:2px 7px;}
  #daywords{display:none;}
  #showdesk{width:26px;}
  #startmenu{left:4px;right:4px;width:auto;bottom:46px;max-height:66vh;}
  #desktop{inset:0 0 42px 0;}
  #win-layer{inset:0 0 42px 0;}
  #sticky-layer{inset:0 0 42px 0;}
  #icons{display:grid;grid-template-columns:repeat(4,1fr);gap:4px 2px;align-content:start;right:8px;overflow:auto;padding-bottom:10px;}
  .icon{width:auto;}
  .icon .glyph{width:38px;height:38px;font-size:25px;}
  .icon .label{font-size:10px;max-width:64px;}
  .taskbtn{max-width:110px;font-size:11px;}
  .win{max-width:calc(100vw - 10px) !important;}
  .sol-card{width:44px;height:62px;font-size:12px;}
  .sol-slot,.sol-col{width:48px;}
  .sol-slot{height:66px;}
  .sudo input{width:26px;height:28px;font-size:13px;}
}
