:root { --xp-blue: #0c55c7; --xp-dark: #003a94; --xp-light: #3989f5; --cream: #d8d1bd; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; overflow: hidden; }
button { font: inherit; }
body { color: #10223b; font-family: Tahoma, "Microsoft YaHei", Arial, sans-serif; background: #b6b3aa; }
button:focus-visible { outline: 2px solid #ffb62e; outline-offset: 2px; }

.room { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: clip; padding: 28px 24px 48px; background: radial-gradient(circle at 50% 22%, #f8f3e9 0 15%, #ddd7cb 48%, #aaa69f 100%); }
.room::before { content: ""; position: absolute; inset: 67% -10% -25%; background: linear-gradient(#b7b0a6, #8d8881); transform: perspective(500px) rotateX(65deg); transform-origin: top; border-top: 1px solid #a6a097; }
.ambient { position: absolute; width: 28vw; height: 28vw; border-radius: 50%; filter: blur(70px); opacity: .25; }
.ambient-left { left: -8vw; top: 15%; background: #ffbe6b; }.ambient-right { right: -8vw; top: 5%; background: #7cb7ff; }

.computer { position: relative; z-index: 2; width: min(1120px, 92vw); height: min(850px, calc(100vh - 70px)); min-height: 550px; padding: 18px 24px 24px; background: linear-gradient(105deg, #aba28e 0%, #eee8d4 8%, #d8d1bd 49%, #a9a18e 100%); border: 2px solid #8f8879; border-radius: 34px 34px 42px 42px / 26px 26px 50px 50px; box-shadow: inset 4px 4px 8px #fff8dc, inset -6px -6px 14px #817967, 0 45px 80px #4c494566, 0 7px 0 #777165; }
.computer::before, .computer::after { content: ""; position: absolute; background: #706b5f; opacity: .25; filter: blur(1px); }
.computer::before { width: 120px; height: 5px; top: 11px; left: 50%; transform: translateX(-50%); border-radius: 50%; }.computer::after { inset: 16px 18px auto; height: 1px; }
.computer-top { height: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 7px; color: #6b665a; font: 700 9px/1 Arial; letter-spacing: 1.6px; text-shadow: 0 1px #fff; }
.computer-top i { width: 8px; height: 8px; border-radius: 50%; background: #9b9586; box-shadow: inset 1px 1px 2px #5f5a50, 0 1px #fff; }
.bezel { height: calc(100% - 84px); padding: 19px 24px 9px; background: linear-gradient(135deg, #958c78, #f3ecd8 5%, #d7d0bb 50%, #958d7b 97%); border: 2px solid #7f786a; border-radius: 24px 24px 34px 34px; box-shadow: inset 6px 6px 12px #7e7564, inset -5px -5px 9px #fff7df, 0 2px 0 #fff4d5; }
.screen-wrap { height: calc(100% - 37px); padding: 12px; background: #242729; border-radius: 30px 30px 37px 37px / 24px 24px 40px 40px; box-shadow: inset 0 0 12px #000, 2px 2px 2px #f8f2de, -1px -1px 2px #635d53; }
.crt-glass { position: relative; height: 100%; overflow: hidden; border-radius: 21px / 16px; background: #000; box-shadow: inset 0 0 35px #000; transform: translateZ(0); }
.scanlines { position: absolute; z-index: 50; pointer-events: none; inset: 0; opacity: .11; background: repeating-linear-gradient(to bottom, #fff0 0 2px, #000 3px 4px); mix-blend-mode: multiply; }
.screen-glare { position: absolute; z-index: 51; pointer-events: none; inset: 0; background: radial-gradient(ellipse at center, transparent 52%, #00152a44 100%), linear-gradient(112deg, #fff1 0 3%, transparent 15% 78%, #fff1 90%); border-radius: inherit; }
.monitor-controls { height: 37px; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 5px 16px 0; font: 700 7px Arial; color: #70695d; letter-spacing: 1px; }
.monitor-controls i { width: 7px; height: 7px; border-radius: 50%; background: #898276; border: 1px solid #625e56; box-shadow: 0 1px #fff; }.monitor-controls .power { width: 18px; height: 18px; border: 1px solid #827b6e; border-radius: 50%; background: #a8a192; box-shadow: inset 1px 1px #f7f0dd, 0 1px 2px #776f62; position: relative; }.monitor-controls .power::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #57e56b; top: 6px; left: 6px; box-shadow: 0 0 6px #25e745; }
.computer-bottom { height: 49px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px 4px; color: #6d675a; font: 700 8px Arial; letter-spacing: 1.2px; text-shadow: 0 1px #fff; }.vents { font-size: 14px; letter-spacing: 5px; max-width: 180px; overflow: hidden; color: #827b6d; text-shadow: 1px 1px #f5eed9; white-space: nowrap; }
.hint { position: absolute; bottom: 14px; z-index: 3; margin: 0; color: #65615b; font-size: 12px; letter-spacing: 1.2px; }

.boot-screen { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; color: white; background: #050505; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.xp-logo { margin-top: -5%; text-align: left; font-family: Arial, sans-serif; transform: scale(1.08); }.xp-logo > span { display: block; padding-left: 3px; color: #ddd; font-size: 12px; letter-spacing: .4px; }.xp-logo > span span { vertical-align: super; font-size: 7px; }.xp-logo strong { display: block; color: #fff; font-weight: 500; font-size: clamp(34px, 5vw, 65px); letter-spacing: -3px; }.xp-logo strong span { color: #ff6a00; font-size: .52em; font-style: italic; font-weight: 700; letter-spacing: -2px; margin-left: 6px; }
.boot-loader { width: 160px; height: 18px; margin-top: 58px; padding: 3px; overflow: hidden; border: 2px solid #aaa; border-radius: 4px; display: flex; gap: 3px; }.boot-loader i { width: 23px; height: 8px; flex: none; background: linear-gradient(90deg, #123cbe, #5d94f8 50%, #1039b4); animation: load 1.35s linear infinite; transform: translateX(-90px); }.boot-loader i:nth-child(2) { animation-delay: .13s; }.boot-loader i:nth-child(3) { animation-delay: .26s; }
.boot-screen small { position: absolute; bottom: 25px; left: 27px; color: #bbb; font: 10px Arial; }
.xp-logo > span { padding-left: 54px; }
.xp-logo-line { display: flex; align-items: center; gap: 10px; }
.boot-windows-flag {
  display: grid;
  grid-template-columns: repeat(2, 20px);
  grid-template-rows: repeat(2, 18px);
  gap: 3px;
  width: 43px;
  height: 39px;
  transform: perspective(60px) rotateY(-8deg) skewY(-5deg);
  filter: drop-shadow(0 0 3px #ffffff55);
}
.boot-windows-flag i { display: block; box-shadow: inset 0 0 4px #ffffff66; }
.boot-windows-flag i:nth-child(1) { background: linear-gradient(135deg, #f4603d, #c92719); }
.boot-windows-flag i:nth-child(2) { background: linear-gradient(135deg, #84c941, #3b8f22); }
.boot-windows-flag i:nth-child(3) { background: linear-gradient(135deg, #39aee8, #176db9); }
.boot-windows-flag i:nth-child(4) { background: linear-gradient(135deg, #ffd84b, #e49b13); }
@keyframes load { from { transform: translateX(-90px); } to { transform: translateX(175px); } }

.login-screen { position: absolute; inset: 0; display: grid; grid-template-rows: 58px 1fr 76px; background: #5a8fe2; color: white; animation: reveal .45s ease; }.login-screen > header { display: flex; justify-content: flex-end; align-items: center; padding: 0 5%; background: linear-gradient(#063e9e, #0b54c7); border-bottom: 3px solid #e0a12c; box-shadow: 0 3px 10px #174d9c; }.mini-xp { font: 18px Arial; font-style: italic; text-shadow: 1px 2px 2px #05367d; }.mini-xp b { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 3px; color: #fff; background: conic-gradient(#f1462e 0 25%, #54ae36 0 50%, #15a9df 0 75%, #f3d63f 0); transform: perspective(30px) rotateY(-15deg); clip-path: polygon(5% 5%, 95% 0, 90% 95%, 0 100%); }.mini-xp i { color: #ff8a00; font-weight: 800; font-size: 13px; }
.login-main { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; overflow: hidden; background: radial-gradient(circle at 45% 40%, #82aff1, #5288d9 65%, #3c75cd); }.login-main::after { content: ""; position: absolute; left: 50%; top: 14%; width: 1px; height: 72%; background: linear-gradient(transparent, #d9e7fb, transparent); box-shadow: 1px 0 #3568b9; }
.hello { padding: 0 11% 0 16%; text-align: right; text-shadow: 1px 2px 2px #315d9f; }.hello p { margin: 0; font-size: clamp(26px, 3vw, 49px); font-weight: 300; line-height: .8; }.hello h1 { margin: 12px 0; font-size: clamp(29px, 4.2vw, 68px); font-weight: 500; line-height: 1; letter-spacing: -3px; }.hello span { font-size: 15px; color: #dbe9ff; }
.user-card { margin-left: 9%; width: min(370px, 82%); padding: 9px 12px 9px 9px; color: white; border: 2px solid transparent; border-radius: 7px; background: linear-gradient(90deg, #2562bdcc, #2869c200 94%); display: grid; grid-template-columns: 70px 1fr 34px; align-items: center; gap: 14px; text-align: left; cursor: pointer; transition: .2s ease; }.user-card:hover { border-color: #fff; background: linear-gradient(90deg, #215aae, #3b76ca22); box-shadow: 0 4px 15px #25589c; }.avatar { width: 70px; height: 70px; padding: 3px; border: 2px solid #fff; border-radius: 7px; background: #ffb636; box-shadow: 2px 3px 6px #2e5e9e; }.avatar i { display: grid; place-items: center; width: 100%; height: 100%; font-style: normal; font: 700 28px "Microsoft YaHei"; color: #153b74; background: linear-gradient(145deg, #ffe39c, #f2a62e); border-radius: 3px; }.user-card b { display: block; margin-bottom: 7px; font-size: 21px; text-shadow: 1px 2px #234b8a; }.user-card small { color: #d7e8ff; font-size: 12px; }.login-arrow { display: grid; place-items: center; width: 28px; height: 28px; background: #49a644; border: 2px solid #fff; border-radius: 5px; font-style: normal; box-shadow: 1px 2px 3px #1b4f8e; }
.login-screen > footer { display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 8%; background: linear-gradient(#063f9e, #0b55c4); border-top: 3px solid #e6a72b; }.login-screen > footer button { justify-self: end; margin-right: 9%; color: white; border: 0; background: transparent; cursor: pointer; }.login-screen > footer button i { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: 8px; background: #d9573a; border: 1px solid white; border-radius: 4px; font-style: normal; }.login-screen > footer p { font-size: 11px; line-height: 1.5; color: #d9e8ff; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

.desktop { position: absolute; inset: 0; overflow: clip; background: linear-gradient(#2580d7 0 58%, #63a839 58%); animation: reveal .5s ease; }.sky { position: absolute; inset: 0 0 42%; background: linear-gradient(#0b7bd5, #53b5ed 65%, #b2ddf5); }.sky i { position: absolute; width: 85px; height: 23px; border-radius: 50%; background: #fff; filter: blur(1px); opacity: .84; box-shadow: 35px -8px 0 4px #fff, 68px 2px 0 -4px #fff; }.sky i:nth-child(1) { top: 14%; left: 16%; transform: scale(.8); }.sky i:nth-child(2) { top: 31%; right: 19%; transform: scale(1.2); }.sky i:nth-child(3) { top: 52%; left: 52%; transform: scale(.55); opacity: .6; }.hill { position: absolute; border-radius: 50% 50% 0 0; }.hill-back { left: -15%; top: 42%; width: 77%; height: 62%; transform: rotate(-5deg); background: linear-gradient(125deg, #4da72d, #9ad749 55%, #419b2b); box-shadow: inset -30px 22px 40px #d3ee6a66; }.hill-front { right: -17%; top: 56%; width: 86%; height: 60%; transform: rotate(7deg); background: linear-gradient(110deg, #86c53e, #3d9f2c 62%, #197e27); box-shadow: inset 20px 18px 45px #bfea5f88; }
.desktop-icons { position: absolute; z-index: 3; inset: 16px auto 42px 12px; display: flex; flex-flow: column wrap; align-content: flex-start; gap: 8px 4px; max-height: calc(100% - 58px); }.desktop-icon { width: 82px; min-height: 78px; padding: 5px 3px; border: 1px solid transparent; color: white; background: transparent; border-radius: 2px; cursor: default; text-align: center; text-shadow: 1px 1px 2px #000; }.desktop-icon:hover, .desktop-icon:focus { border-color: #aacafb99; background: #2768bd55; }.pixel-icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 2px; font-size: 35px; filter: drop-shadow(2px 3px 1px #003e77aa); }.desktop-icon b { display: block; font-size: 11px; line-height: 1.25; font-weight: 500; }

.xp-window { position: absolute; z-index: 20; left: 50%; top: 49%; width: min(760px, 82%); height: min(520px, 78%); display: grid; grid-template-rows: 30px 25px 35px 1fr 22px; overflow: hidden; background: #ece9d8; border: 3px solid var(--xp-blue); border-radius: 8px 8px 2px 2px; box-shadow: 6px 8px 25px #00346888; touch-action: none; }.window-bar { display: flex; align-items: center; gap: 5px; padding: 2px 3px 2px 5px; color: white; cursor: move; background: linear-gradient(#4094f8 0, #0754d3 18%, #0756cf 75%, #063a9d); text-shadow: 1px 1px #003989; }.window-app-icon { font-size: 17px; }.window-bar > b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }.window-controls { margin-left: auto; display: flex; gap: 2px; }.window-controls button { width: 23px; height: 22px; padding: 0; border: 1px solid white; border-radius: 3px; color: white; background: linear-gradient(145deg, #63a5f4, #1262cf); box-shadow: inset 1px 1px #96c7ff; font: 700 15px/17px Arial; }.window-controls .close { background: linear-gradient(145deg, #ed9b7b, #c63118 55%, #a8220d); }.window-menu { display: flex; align-items: center; gap: 18px; padding: 0 8px; border-bottom: 1px solid #aca899; background: #f4f2e9; font-size: 11px; }.window-toolbar { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-bottom: 1px solid #aca899; background: #ece9d8; font-size: 10px; }.window-toolbar button { height: 24px; border: 0; background: transparent; font-weight: 700; color: #2464bd; }.window-toolbar .disabled { opacity: .35; }.window-toolbar > div { flex: 1; min-width: 0; height: 23px; padding: 4px 6px; overflow: hidden; border: 1px inset #ddd; background: white; white-space: nowrap; }.window-layout { min-height: 0; display: grid; grid-template-columns: 160px 1fr; }.window-layout aside { padding: 12px; overflow: hidden; color: #15418b; background: linear-gradient(135deg, #7ca8ee, #5c82d8); }.window-layout aside h3 { display: flex; justify-content: space-between; margin: 0 0 5px; padding: 7px 8px; color: #17459a; background: linear-gradient(90deg, #fff, #c6d7fb); border-radius: 5px 5px 0 0; font-size: 11px; }.window-layout aside p { margin: 7px 6px; padding-left: 10px; font-size: 10px; color: white; }.window-layout aside p::before { content: "› "; color: #d7f08a; }.window-layout aside small { display: block; margin: 6px; color: white; font-size: 9px; line-height: 1.7; }.window-content { padding: clamp(16px, 3vw, 30px); overflow: auto; background: #fff; color: #17263a; }.window-content h2 { margin: 0 0 9px; color: #154e9d; font: 700 24px Georgia, serif; }.window-content p { font-size: 12px; line-height: 1.7; }.window-content .lead { max-width: 470px; color: #3e5573; font-size: 16px; }.note { margin-top: 22px; padding: 9px 12px; border-left: 3px solid #6aa730; color: #687587; background: #f3f6ee; font-size: 10px !important; }.status-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; background: #ece9d8; font-size: 9px; }.status-bar span { padding: 2px 5px; border: 1px inset #f7f4e8; }
.info-grid { display: grid; grid-template-columns: 100px 1fr; gap: 1px; margin-top: 18px; font-size: 12px; background: #d5deeb; border: 1px solid #d5deeb; }.info-grid span, .info-grid b { padding: 8px 10px; background: #f7f9fb; }.online { color: #51992d; }.timeline-item { position: relative; margin-left: 5px; padding: 0 0 20px 22px; border-left: 2px solid #79a9e8; }.timeline-item::before { content: ""; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; background: #ffbd35; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #2e69bb; }.timeline-item time { color: #2d67ad; font-size: 10px; font-weight: 700; }.timeline-item h2 { margin: 5px 0 0; font-family: Tahoma, sans-serif; font-size: 17px; }.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.work-card { padding: 6px; border: 1px solid #b6c6dd; background: #f9fbff; box-shadow: 2px 2px 0 #dbe4ef; }.work-card h3 { margin: 8px 3px 0; font-size: 10px; color: #1557ac; }.work-card p { margin: 2px 3px; font-size: 9px; }.work-thumb { aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #ffca54, #f1663c); }.work-thumb-2 { background: linear-gradient(145deg, #81d6d2, #3173b9); }.work-thumb-3 { background: linear-gradient(145deg, #e0a5e9, #6f4bb4); }.work-thumb span { color: #ffffff99; font: 700 42px Georgia; transform: rotate(-12deg); }.skill-list { display: grid; gap: 12px; }.skill { display: grid; grid-template-columns: 75px 1fr 35px; align-items: center; gap: 9px; font-size: 11px; }.skill > div { height: 13px; padding: 2px; border: 1px inset #ccc; background: white; }.skill i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #4d9c3c 0 8px, #82c969 8px 10px); }.skill b { color: #346dad; font-size: 10px; }.diploma, .contact-card { display: flex; align-items: center; gap: 20px; padding: 20px; color: white; background: linear-gradient(135deg, #194b9b, #4b88da); border: 4px double white; outline: 1px solid #24569e; }.diploma-mark, .mail-art { display: grid; place-items: center; flex: 0 0 68px; width: 68px; height: 68px; border: 2px solid #ffd95e; border-radius: 50%; color: #ffd95e; font: italic 700 37px Georgia; }.diploma h2, .contact-card h2 { margin: 2px 0; color: white; }.diploma p, .contact-card p { margin: 0; }.contact-card { background: linear-gradient(135deg, #ef742f, #f0ad30); }.mail-art { border-color: white; color: white; font-family: Arial; }.contact-links { display: flex; gap: 8px; margin-top: 16px; }.contact-links button { padding: 7px 12px; border: 1px solid #1d59a7; color: #164e97; background: linear-gradient(#fff, #dbe9fa); border-radius: 3px; font-size: 10px; }

.taskbar { position: absolute; z-index: 35; left: 0; right: 0; bottom: 0; height: 32px; display: flex; background: linear-gradient(#2c81ed 0, #1259d2 14%, #0d53c7 78%, #174bbb); box-shadow: inset 0 2px 2px #63adff; }.start-button { width: 98px; border: 0; border-radius: 0 11px 11px 0 / 0 50% 50% 0; color: white; background: linear-gradient(#63ba53 0, #2f982e 18%, #218423 80%, #176b1c); box-shadow: inset 0 2px 2px #8add7b, 2px 0 5px #064199; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 15px; font-style: italic; text-shadow: 1px 1px 2px #07550d; }.start-button:hover, .start-button.pressed { filter: brightness(.88); }.windows-flag { display: inline-grid; place-items: center; width: 21px; height: 20px; color: white; background: conic-gradient(#ef4e31 0 25%, #60b632 0 50%, #29aade 0 75%, #f6d52a 0); clip-path: polygon(4% 6%, 96% 0, 92% 94%, 0 100%); font-style: normal; font-size: 18px; }.quick-launch { display: flex; align-items: center; padding: 0 6px; border-right: 1px solid #0b44a9; }.quick-launch button { width: 26px; border: 0; background: transparent; padding: 0; }.task-items { flex: 1; padding: 3px 5px; min-width: 0; }.task-items button { width: min(190px, 50%); height: 26px; overflow: hidden; border: 1px solid #0b42a8; border-radius: 2px; color: white; background: #3981dc; text-align: left; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }.task-items button.active { background: #1d4fa4; box-shadow: inset 1px 1px 2px #0c3478; }.tray { display: flex; align-items: center; gap: 7px; padding: 0 12px; color: white; background: linear-gradient(#26a4ed, #1388d7); border-left: 1px solid #52c4f7; font-size: 10px; }.tray time { min-width: 34px; }
.start-menu { position: absolute; z-index: 34; left: 0; bottom: 31px; width: 380px; color: #15346b; background: white; border: 2px solid #1553b9; border-radius: 7px 7px 0 0; box-shadow: 4px -4px 12px #00398377; overflow: hidden; }.start-menu > header { height: 62px; display: flex; align-items: center; gap: 11px; padding: 7px 10px; color: white; background: linear-gradient(#2f8beb, #1260c8); font-size: 17px; text-shadow: 1px 1px #16437e; }.start-avatar { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid white; border-radius: 5px; color: #153b74; background: linear-gradient(145deg, #ffe39c, #f2a62e); font-weight: 700; }.start-columns { display: grid; grid-template-columns: 1fr 1fr; min-height: 238px; }.start-columns > div { padding: 7px 5px; }.start-columns > div:last-child { background: #d9e8fb; border-left: 1px solid #9bb9df; }.start-columns button { width: 100%; min-height: 48px; border: 0; display: flex; align-items: center; gap: 9px; color: #17375f; background: transparent; text-align: left; font-size: 11px; }.start-columns button:hover { color: white; background: #2c70d0; }.start-columns button span { width: 34px; font-size: 25px; text-align: center; }.start-menu > footer { height: 40px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 0 12px; background: linear-gradient(#2a83dc, #1261c7); }.start-menu > footer button { color: white; border: 0; background: transparent; font-size: 10px; }

@media (max-width: 760px) {
  .room { padding: 10px 7px 31px; }.computer { width: 99vw; height: calc(100vh - 42px); min-height: 520px; padding: 10px 10px 15px; border-radius: 22px; }.computer-top { height: 18px; }.bezel { height: calc(100% - 58px); padding: 10px 11px 5px; border-radius: 18px; }.screen-wrap { height: calc(100% - 28px); padding: 7px; border-radius: 18px; }.monitor-controls { height: 28px; }.computer-bottom { height: 32px; }.computer-bottom span, .vents { display: none; }.hint { bottom: 7px; font-size: 9px; }
  .login-screen { grid-template-rows: 44px 1fr 58px; }.login-main { grid-template-columns: 1fr; grid-template-rows: 1fr 1.2fr; }.login-main::after { left: 12%; right: 12%; top: 44%; width: auto; height: 1px; }.hello { align-self: end; padding: 0 10% 20px; text-align: center; }.hello h1 { letter-spacing: -2px; }.user-card { align-self: start; margin: 24px auto 0; width: 88%; grid-template-columns: 54px 1fr 30px; }.avatar { width: 54px; height: 54px; }.login-screen > footer { padding: 0 4%; grid-template-columns: 1fr 1.4fr; }.login-screen > footer button { justify-self: start; margin: 0; font-size: 9px; }
  .desktop-icons { inset: 8px 0 38px 5px; flex-flow: row wrap; align-content: flex-start; gap: 1px; }.desktop-icon { width: 66px; min-height: 67px; }.pixel-icon { width: 38px; height: 38px; font-size: 29px; }.desktop-icon b { font-size: 9px; }
  .xp-window { width: 94%; height: 72%; top: 49%; grid-template-rows: 28px 22px 31px 1fr 19px; }.window-menu { gap: 9px; font-size: 9px; }.window-layout { grid-template-columns: 1fr; }.window-layout aside { display: none; }.window-content { padding: 16px; }.window-content h2 { font-size: 19px; }.work-grid { grid-template-columns: 1fr; }.work-card { display: grid; grid-template-columns: 75px 1fr; }.work-thumb { grid-row: 1 / 3; }.start-menu { width: min(360px, 96%); }.quick-launch { display: none; }.tray { padding: 0 7px; gap: 4px; }.tray span:nth-child(2) { display: none; }
}

/* Walking digital twin above the XP taskbar. */
.desktop .desktop-pet {
  position: absolute;
  z-index: 18;
  left: 0;
  bottom: 31px;
  width: 154px;
  height: 194px;
  padding: 0;
  border: 0;
  color: #202020;
  background: transparent;
  cursor: pointer !important;
  touch-action: manipulation;
  will-change: left;
}
.desktop-pet-bubble {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  min-width: 136px;
  padding: 8px 11px 9px;
  border: 3px solid #2d211d;
  border-radius: 48% 50% 46% 52%;
  background: #fff9e8;
  box-shadow: 0 4px 0 #164f9c2e;
  font: 800 14px/1.15 "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-1deg);
  animation: desktop-pet-bubble 1.8s ease-in-out infinite alternate;
}
.desktop-pet-bubble::before,
.desktop-pet-bubble::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  border-style: solid;
  transform: translateX(-50%);
}
.desktop-pet-bubble::before { border-width: 15px 10px 0; border-color: #2d211d transparent transparent; }
.desktop-pet-bubble::after { bottom: -10px; border-width: 11px 7px 0; border-color: #fff9e8 transparent transparent; }
.desktop-pet-sprite {
  position: absolute;
  left: 7px;
  bottom: 0;
  width: 140.2px;
  height: 140.25px;
  overflow: hidden;
  background-image: url("digital-avatar-scooter-right.png");
  background-repeat: no-repeat;
  background-size: 701px 561px;
  filter: drop-shadow(0 4px 2px #083d7338);
  transform: translateY(var(--pet-frame-y, 0px));
  transform-origin: 50% 100%;
  transition: filter .16s ease;
}
.desktop-pet.walking-left .desktop-pet-sprite { background-image: url("digital-avatar-scooter-left.png"); }
.desktop-pet:hover .desktop-pet-sprite,
.desktop-pet:focus-visible .desktop-pet-sprite { filter: drop-shadow(0 5px 3px #063e7690) saturate(1.12); }
.desktop-pet:hover .desktop-pet-bubble,
.desktop-pet:focus-visible .desktop-pet-bubble { background: #fff3b7; }
.desktop-pet.opening-chat { animation: desktop-pet-open .34s ease-out; }

@keyframes desktop-pet-bubble {
  from { transform: translateX(-50%) translateY(0) rotate(-1deg); }
  to { transform: translateX(-50%) translateY(-4px) rotate(1deg); }
}
@keyframes desktop-pet-open {
  0%, 100% { margin-bottom: 0; }
  45% { margin-bottom: 12px; }
}

@media (max-width: 760px) {
  .desktop .desktop-pet {
    bottom: 30px;
    width: 124px;
    height: 160px;
  }
  .desktop-pet-sprite {
    left: -8px;
    bottom: -2px;
    transform: translateY(var(--pet-frame-y, 0px)) scale(.82);
  }
  .desktop-pet.walking-left .desktop-pet-sprite { transform: translateY(var(--pet-frame-y, 0px)) scale(.82); }
  .desktop-pet-bubble {
    top: 3px;
    min-width: 115px;
    padding: 7px 8px 8px;
    border-width: 2px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-pet-bubble { animation: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }

/* v2: larger screen, slimmer shell and fuller application windows */
.room { padding: 2px 3px 9px; }
.computer {
  width: min(1900px, 99.4vw);
  height: min(1080px, 99vh);
  min-height: 520px;
  padding: 5px 7px 6px;
  border-radius: 18px 18px 22px 22px / 15px 15px 24px 24px;
}
.computer-top { height: 13px; padding: 0 7px 2px; }
.computer-top span { font-size: 6px; }
.computer::before { top: 4px; height: 3px; }
.computer::after { inset: 8px 10px auto; }
.bezel {
  height: calc(100% - 25px);
  padding: 5px 6px 2px;
  border-radius: 13px 13px 16px 16px;
}
.screen-wrap {
  height: calc(100% - 17px);
  padding: 3px;
  border-radius: 14px 14px 17px 17px / 12px 12px 18px 18px;
}
.crt-glass { border-radius: 10px / 8px; }
.monitor-controls { height: 17px; padding: 1px 9px 0; gap: 7px; }
.monitor-controls span { font-size: 5px; }
.monitor-controls i { width: 5px; height: 5px; }
.monitor-controls .power { width: 12px; height: 12px; }
.monitor-controls .power::after { width: 4px; height: 4px; top: 3px; left: 3px; }
.computer-bottom { height: 12px; padding: 0 10px; align-items: center; }
.computer-bottom span { font-size: 5px; }
.vents { font-size: 7px; max-width: 110px; letter-spacing: 3px; }
.hint { display: none; }

.crt-glass, .crt-glass * { cursor: default !important; }

.desktop { background-size: 140% 140%; animation: desktop-color 18s ease-in-out infinite alternate; }
.sky { overflow: hidden; animation: sky-breathe 14s ease-in-out infinite alternate; }
.sky i { --cloud-scale: 1; animation: cloud-drift 22s ease-in-out infinite alternate; will-change: transform; }
.sky i:nth-child(1) { --cloud-scale: .8; animation-duration: 19s; }
.sky i:nth-child(2) { --cloud-scale: 1.2; animation-duration: 25s; animation-direction: alternate-reverse; }
.sky i:nth-child(3) { --cloud-scale: .55; animation-duration: 16s; }
.hill-back { animation: hill-back-move 16s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.hill-front { animation: hill-front-move 20s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes cloud-drift {
  from { transform: translate3d(-28px, 0, 0) scale(var(--cloud-scale)); }
  to { transform: translate3d(58px, 9px, 0) scale(var(--cloud-scale)); }
}
@keyframes sky-breathe { from { filter: saturate(.94) brightness(.98); } to { filter: saturate(1.13) brightness(1.06); } }
@keyframes desktop-color { from { background-position: 0 0; } to { background-position: 70% 35%; } }
@keyframes hill-back-move { from { transform: rotate(-5deg) scale(1); } to { transform: rotate(-4.2deg) scale(1.018); } }
@keyframes hill-front-move { from { transform: rotate(7deg) translateX(0); } to { transform: rotate(6.2deg) translateX(-1.5%); } }

.xp-window {
  width: min(1180px, 91%);
  height: min(760px, 87%);
  top: 48%;
  transition: width .18s ease, height .18s ease, left .18s ease, top .18s ease, transform .18s ease;
}
.xp-window.maximized {
  left: 4px !important;
  top: 4px !important;
  width: calc(100% - 8px) !important;
  height: calc(100% - 40px) !important;
  transform: none !important;
  border-radius: 4px 4px 0 0;
}
.window-content { padding: clamp(19px, 2.6vw, 36px); }
.window-content h2 { font-size: clamp(23px, 2.3vw, 32px); }
.window-content p { font-size: 13px; }
.window-content .lead { max-width: 680px; font-size: clamp(17px, 1.7vw, 22px); }
.window-layout { grid-template-columns: 1fr; }
.window-layout aside { display: none; }

.avatar,
.start-avatar {
  background: #fff;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}
.start-avatar {
  overflow: hidden;
  padding: 2px;
}
.start-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

@media (max-width: 760px) {
  .room { padding: 1px; }
  .computer { width: 100vw; height: 100vh; min-height: 500px; padding: 3px; border-radius: 9px; }
  .computer-top { height: 9px; padding-bottom: 1px; }
  .computer-top span { display: none; }
  .bezel { height: calc(100% - 14px); padding: 3px 3px 1px; border-radius: 7px; }
  .screen-wrap { height: calc(100% - 11px); padding: 2px; border-radius: 7px; }
  .monitor-controls { height: 11px; }
  .computer-bottom { height: 5px; }
  .xp-window { width: 97%; height: 82%; top: 47%; }
  .xp-window.maximized { height: calc(100% - 37px) !important; }
  .window-layout { grid-template-columns: 1fr; }
}

/* Animated XP landscape refresh */
.desktop {
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 17%, #fffbd18c 0 3%, #fff3a22e 10%, transparent 25%),
    linear-gradient(155deg, #0875d0 0%, #23a6e8 39%, #a7ddf5 60%, #5da933 60%, #247d27 100%);
  background-size: 125% 125%, 100% 100%;
  animation: desktop-sky-shift 22s ease-in-out infinite alternate;
}
.desktop::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 32px;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 28%, #fff9bf0d 43%, #ffffff24 49%, transparent 61%);
  mix-blend-mode: screen;
  animation: sunlight-sweep 16s ease-in-out infinite alternate;
}
.desktop::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 32px;
  height: 34%;
  pointer-events: none;
  opacity: .18;
  background:
    repeating-linear-gradient(102deg, transparent 0 13px, #dfff7d99 14px 15px, transparent 16px 28px),
    linear-gradient(transparent, #0b5e2499);
  transform-origin: 50% 100%;
  animation: grass-shimmer 9s ease-in-out infinite alternate;
}
.sky {
  z-index: 0;
  inset: 0 0 39%;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 22%, #fffce7 0 2.5%, #ffe99caa 4%, transparent 15%),
    linear-gradient(180deg, #0873cf 0%, #35abe9 58%, #b9e5f7 100%);
  background-size: 112% 112%;
  animation: sky-light 13s ease-in-out infinite alternate;
}
.sky::before {
  content: "";
  position: absolute;
  width: 22vw;
  height: 22vw;
  min-width: 150px;
  min-height: 150px;
  right: 7%;
  top: -13%;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbd8b8 0 9%, #ffe98544 28%, transparent 68%);
  animation: sun-pulse 7s ease-in-out infinite alternate;
}
.sky::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8px;
  height: 32%;
  background: linear-gradient(transparent, #effbff66 62%, #ffffff7a);
  animation: horizon-breathe 11s ease-in-out infinite alternate;
}
.sky i {
  --cloud-scale: 1;
  position: absolute;
  left: -18%;
  right: auto;
  width: clamp(72px, 8vw, 118px);
  height: clamp(20px, 2.3vw, 32px);
  border-radius: 55% 55% 45% 48%;
  background: linear-gradient(#ffffff, #eaf7ff 74%, #cfeafa);
  opacity: .88;
  box-shadow: 34px -10px 0 5px #fff, 70px 1px 0 -3px #eefaff, 47px 7px 12px #7cbce355;
  filter: none;
  will-change: transform;
  animation: cloud-sailing 38s linear infinite;
}
.sky i:nth-child(1) { top: 16%; --cloud-scale: .78; animation-duration: 34s; animation-delay: -4s; }
.sky i:nth-child(2) { top: 32%; --cloud-scale: 1.1; animation-duration: 46s; animation-delay: -27s; }
.sky i:nth-child(3) { top: 54%; --cloud-scale: .52; animation-duration: 29s; animation-delay: -15s; opacity: .62; }
.sky i:nth-child(4) { top: 8%; --cloud-scale: .42; animation-duration: 51s; animation-delay: -38s; opacity: .58; }
.sky i:nth-child(5) { top: 44%; --cloud-scale: .68; animation-duration: 40s; animation-delay: -9s; opacity: .72; }
.hill {
  overflow: hidden;
  filter: saturate(1.08);
}
.hill::before,
.hill::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.hill-back {
  z-index: 0;
  left: -17%;
  top: 43%;
  width: 80%;
  height: 64%;
  background:
    radial-gradient(ellipse at 55% 0%, #d7ef77b8 0 12%, transparent 38%),
    linear-gradient(126deg, #3f9d2b 0%, #91d34b 50%, #328c2a 100%);
  box-shadow: inset -36px 24px 48px #d8f27b55, 0 -8px 22px #c7ed7970;
  animation: hill-back-deluxe 18s ease-in-out infinite alternate;
}
.hill-back::before {
  inset: 12% 8% 0 18%;
  border-radius: 50%;
  background: linear-gradient(145deg, #e6f69c55, transparent 52%);
}
.hill-front {
  z-index: 1;
  right: -18%;
  top: 55%;
  width: 89%;
  height: 64%;
  background:
    radial-gradient(ellipse at 30% 2%, #d9f47a9c 0 10%, transparent 36%),
    linear-gradient(112deg, #82c843 0%, #37952c 61%, #176d28 100%);
  box-shadow: inset 24px 19px 50px #c9ef7180, 0 -8px 20px #d9f68a55;
  animation: hill-front-deluxe 23s ease-in-out infinite alternate;
}
.hill-front::after {
  left: 25%;
  right: -8%;
  top: 18%;
  height: 72%;
  border-radius: 52% 0 0 0;
  background: linear-gradient(135deg, transparent 5%, #2b81283b 48%, #0f5a2b73);
}
@keyframes cloud-sailing {
  from { transform: translate3d(-8vw, 0, 0) scale(var(--cloud-scale)); }
  to { transform: translate3d(138vw, 8px, 0) scale(var(--cloud-scale)); }
}
@keyframes desktop-sky-shift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 16% 9%, 0 0; }
}
@keyframes sky-light {
  from { background-position: 0 0; }
  to { background-position: 6% 4%; }
}
@keyframes sunlight-sweep {
  from { transform: translateX(-9%); opacity: .42; }
  to { transform: translateX(9%); opacity: .82; }
}
@keyframes sun-pulse {
  from { transform: scale(.94); opacity: .72; }
  to { transform: scale(1.07); opacity: 1; }
}
@keyframes horizon-breathe {
  from { opacity: .45; transform: translateY(3px); }
  to { opacity: .82; transform: translateY(-2px); }
}
@keyframes grass-shimmer {
  from { transform: skewX(-1deg) scaleX(1.01); background-position: 0 0, 0 0; }
  to { transform: skewX(1deg) scaleX(1.02); background-position: 38px 0, 0 0; }
}
@keyframes hill-back-deluxe {
  from { transform: rotate(-5deg) scale(1); }
  to { transform: rotate(-4.35deg) scale(1.018) translateX(1%); }
}
@keyframes hill-front-deluxe {
  from { transform: rotate(7deg) translateX(0) scale(1); }
  to { transform: rotate(6.3deg) translateX(-1.5%) scale(1.012); }
}
@media (prefers-reduced-motion: reduce) {
  .desktop,
  .desktop::before,
  .desktop::after,
  .sky,
  .sky::before,
  .sky::after,
  .sky i,
  .hill-back,
  .hill-front { animation: none !important; }
}

/* Meadow variation: soft rolling fields with a winding path */
.desktop::after {
  height: 31%;
  opacity: .48;
  background:
    radial-gradient(circle at 12px 10px, #fff8c8 0 1px, transparent 1.8px),
    radial-gradient(circle at 47px 31px, #ffd44d 0 1.2px, transparent 2px),
    radial-gradient(circle at 78px 18px, #dff59a 0 1px, transparent 1.8px),
    linear-gradient(transparent, #0d5b246b);
  background-size: 96px 62px, 137px 84px, 181px 107px, 100% 100%;
  animation: meadow-specks 16s ease-in-out infinite alternate;
}
.hill-back {
  left: -14%;
  top: 45%;
  width: 75%;
  height: 60%;
  background:
    radial-gradient(ellipse at 57% -2%, #eef7a4c7 0 9%, transparent 34%),
    radial-gradient(ellipse at 28% 22%, #bce4688c 0 12%, transparent 38%),
    linear-gradient(132deg, #4ca534 0%, #86ca43 47%, #3b942f 100%);
  box-shadow: inset -38px 22px 58px #e1f48c4a, 0 -7px 18px #dcf58a5e;
}
.hill-back::before {
  inset: 5% 5% 28% 19%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 48% 0%, #f5f8b264, transparent 64%);
}
.hill-back::after {
  left: 20%;
  right: -22%;
  top: 49%;
  height: 68%;
  border-radius: 54% 0 0;
  background: linear-gradient(143deg, #5aac3530, #236f2a66 68%);
  transform: rotate(7deg);
}
.hill-front {
  right: -13%;
  top: 53%;
  width: 91%;
  height: 68%;
  background:
    radial-gradient(ellipse at 23% 0%, #d9ef79b0 0 9%, transparent 31%),
    radial-gradient(ellipse at 68% 14%, #8fd14980 0 13%, transparent 40%),
    linear-gradient(116deg, #78bd3c 0%, #398f30 58%, #17672c 100%);
  box-shadow: inset 29px 20px 54px #d8ef7b6e, 0 -7px 18px #dff58b50;
}
.hill-front::before {
  left: 43%;
  top: -18%;
  width: 48%;
  height: 125%;
  border-left: clamp(24px, 4.5vw, 66px) solid #dfd29b87;
  border-radius: 50%;
  background: transparent;
  box-shadow: -8px 0 15px #fff6c92b;
  transform: rotate(15deg) skewX(-7deg);
}
.hill-front::after {
  inset: 22% -5% -5% 18%;
  border-radius: 55% 0 0;
  background:
    radial-gradient(ellipse at 30% 20%, #286f2638 0 12%, transparent 38%),
    radial-gradient(ellipse at 73% 48%, #125c2d54 0 16%, transparent 48%),
    linear-gradient(135deg, transparent 18%, #125a2a36 100%);
}
@keyframes meadow-specks {
  from { transform: translate3d(0, 2px, 0); background-position: 0 0, 0 0, 0 0, 0 0; }
  to { transform: translate3d(6px, -2px, 0); background-position: 18px 3px, -15px 2px, 10px -3px, 0 0; }
}
@keyframes hill-back-deluxe {
  from { transform: rotate(-6deg) scale(1); }
  to { transform: rotate(-5.35deg) scale(1.016) translateX(1%); }
}
@keyframes hill-front-deluxe {
  from { transform: rotate(5deg) translateX(0) scale(1); }
  to { transform: rotate(4.35deg) translateX(-1.3%) scale(1.011); }
}
@media (prefers-reduced-motion: reduce) {
  .desktop::after { animation: none !important; }
}

/* Distinct desktop icon hover animations */
.desktop-icon {
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: #d6ecffb8;
  box-shadow: inset 0 0 14px #9fd6ff2b, 0 3px 8px #003f7d45;
}
.desktop-icon .pixel-icon {
  transform-origin: 50% 72%;
  transition: filter .18s ease;
}
.desktop-icon .pixel-icon::before,
.desktop-icon .pixel-icon::after {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  font: 700 16px/1 Arial, sans-serif;
  text-shadow: 0 1px 3px #00376899;
}
.desktop-icon:hover b,
.desktop-icon:focus-visible b {
  text-shadow: 0 0 5px #fff, 1px 2px 2px #00395e;
}

.desktop-icon[data-app="about"]:hover,
.desktop-icon[data-app="about"]:focus-visible { background: #654caf35; }
.desktop-icon[data-app="about"]:hover .pixel-icon,
.desktop-icon[data-app="about"]:focus-visible .pixel-icon { animation: avatar-float 1.15s ease-in-out infinite; }
.desktop-icon[data-app="about"] .pixel-icon::after {
  content: "";
  inset: 4px 5px 5px;
  border: 2px solid #c5eaff;
  border-radius: 50%;
}
.desktop-icon[data-app="about"]:hover .pixel-icon::after,
.desktop-icon[data-app="about"]:focus-visible .pixel-icon::after { animation: avatar-ring 1.15s ease-out infinite; }

.desktop-icon[data-app="contact"]:hover,
.desktop-icon[data-app="contact"]:focus-visible { background: #79b6e035; }
.desktop-icon[data-app="contact"]:hover .pixel-icon,
.desktop-icon[data-app="contact"]:focus-visible .pixel-icon { animation: mail-deliver .82s cubic-bezier(.3,.8,.35,1) infinite alternate; }
.desktop-icon[data-app="contact"] .pixel-icon::after {
  content: "➜";
  right: -15px;
  top: 17px;
  color: #e8fbff;
}
.desktop-icon[data-app="contact"]:hover .pixel-icon::after,
.desktop-icon[data-app="contact"]:focus-visible .pixel-icon::after { animation: mail-trail .82s ease-out infinite; }

.desktop-icon[data-app="resume"]:hover,
.desktop-icon[data-app="resume"]:focus-visible { background: #c96f5a35; }
.desktop-icon[data-app="resume"]:hover .pixel-icon,
.desktop-icon[data-app="resume"]:focus-visible .pixel-icon { animation: case-bounce .92s ease-in-out infinite; }
.desktop-icon[data-app="resume"] .pixel-icon::after {
  content: "✦";
  right: 0;
  top: 1px;
  color: #ffd47c;
}
.desktop-icon[data-app="resume"]:hover .pixel-icon::after,
.desktop-icon[data-app="resume"]:focus-visible .pixel-icon::after { animation: case-spark .92s ease-out infinite; }

.desktop-icon[data-app="portfolio"]:hover,
.desktop-icon[data-app="portfolio"]:focus-visible { background: #efbc3f35; }
.desktop-icon[data-app="portfolio"]:hover .pixel-icon,
.desktop-icon[data-app="portfolio"]:focus-visible .pixel-icon { animation: folder-open 1.05s ease-in-out infinite; }
.desktop-icon[data-app="portfolio"] .pixel-icon::before {
  content: "";
  left: 14px;
  top: 4px;
  width: 25px;
  height: 29px;
  border: 1px solid #8bb6df;
  background: repeating-linear-gradient(#fff 0 5px, #d7e9f7 6px 7px);
  border-radius: 2px;
}
.desktop-icon[data-app="portfolio"]:hover .pixel-icon::before,
.desktop-icon[data-app="portfolio"]:focus-visible .pixel-icon::before { animation: folder-paper 1.05s ease-in-out infinite; }

.desktop-icon[data-app="skills"]:hover,
.desktop-icon[data-app="skills"]:focus-visible { background: #94a7c945; }
.desktop-icon[data-app="skills"]:hover .pixel-icon,
.desktop-icon[data-app="skills"]:focus-visible .pixel-icon { animation: tools-tune 1.18s ease-in-out infinite; }
.desktop-icon[data-app="skills"] .pixel-icon::before,
.desktop-icon[data-app="skills"] .pixel-icon::after {
  content: "✦";
  color: #e9f7ff;
}
.desktop-icon[data-app="skills"] .pixel-icon::before { left: -2px; top: 2px; }
.desktop-icon[data-app="skills"] .pixel-icon::after { right: -2px; bottom: 3px; color: #ffe98b; }
.desktop-icon[data-app="skills"]:hover .pixel-icon::before,
.desktop-icon[data-app="skills"]:focus-visible .pixel-icon::before { animation: tool-spark 1.18s .12s ease-out infinite; }
.desktop-icon[data-app="skills"]:hover .pixel-icon::after,
.desktop-icon[data-app="skills"]:focus-visible .pixel-icon::after { animation: tool-spark 1.18s .55s ease-out infinite; }

.desktop-icon[data-app="education"]:hover,
.desktop-icon[data-app="education"]:focus-visible { background: #4c3c9d42; }
.desktop-icon[data-app="education"]:hover .pixel-icon,
.desktop-icon[data-app="education"]:focus-visible .pixel-icon { animation: cap-toss 1.22s cubic-bezier(.35,.8,.35,1) infinite; }
.desktop-icon[data-app="education"] .pixel-icon::after {
  content: "★";
  right: -1px;
  top: -3px;
  color: #ffd95d;
}
.desktop-icon[data-app="education"]:hover .pixel-icon::after,
.desktop-icon[data-app="education"]:focus-visible .pixel-icon::after { animation: cap-star 1.22s ease-out infinite; }

@keyframes avatar-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.07); }
}
@keyframes avatar-ring {
  0% { opacity: .8; transform: scale(.65); }
  75%, 100% { opacity: 0; transform: scale(1.28); }
}
@keyframes mail-deliver {
  0% { transform: translateX(-4px) rotate(-5deg); }
  55% { transform: translateX(7px) translateY(-3px) rotate(4deg); }
  100% { transform: translateX(2px) rotate(1deg); }
}
@keyframes mail-trail {
  0% { opacity: 0; transform: translateX(-8px) scale(.65); }
  40% { opacity: .9; }
  100% { opacity: 0; transform: translateX(11px) scale(1); }
}
@keyframes case-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  32% { transform: translateY(-7px) rotate(-4deg); }
  52% { transform: translateY(0) scaleY(.9); }
  70% { transform: translateY(-3px) rotate(2deg); }
}
@keyframes case-spark {
  0%, 25% { opacity: 0; transform: scale(.4) rotate(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35) rotate(75deg); }
}
@keyframes folder-open {
  0%, 100% { transform: rotate(0) scale(1); }
  38% { transform: translateY(-2px) rotate(-6deg) scale(1.08); }
  68% { transform: translateY(0) rotate(3deg) scale(1.03); }
}
@keyframes folder-paper {
  0%, 100% { opacity: 0; transform: translateY(13px) rotate(0); }
  42%, 75% { opacity: .95; transform: translateY(-5px) rotate(-5deg); }
}
@keyframes tools-tune {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-14deg) scale(1.08); }
  65% { transform: rotate(15deg) scale(1.1); }
}
@keyframes tool-spark {
  0%, 28% { opacity: 0; transform: scale(.35) rotate(0); }
  52% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.45) rotate(90deg); }
}
@keyframes cap-toss {
  0%, 100% { transform: translateY(0) rotate(0); }
  38% { transform: translateY(-9px) rotate(-12deg); }
  68% { transform: translateY(-3px) rotate(9deg); }
}
@keyframes cap-star {
  0%, 20% { opacity: 0; transform: translate(-8px, 9px) scale(.35); }
  48% { opacity: 1; }
  100% { opacity: 0; transform: translate(5px, -7px) scale(1.2) rotate(95deg); }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-icon .pixel-icon,
  .desktop-icon .pixel-icon::before,
  .desktop-icon .pixel-icon::after { animation: none !important; }
}

/* Multi-part desktop icons for more physical hover motion */
.built-icon {
  isolation: isolate;
  overflow: visible;
  perspective: 120px;
}
.built-icon::before,
.built-icon::after { content: none !important; }
.built-icon i,
.built-icon em {
  position: absolute;
  display: block;
  margin: 0;
  font-style: normal;
  pointer-events: none;
}
.desktop-icon:hover .built-icon,
.desktop-icon:focus-visible .built-icon { animation: none !important; }

/* Personal profile: a smiling emoji greets with a wave */
.about-built i {
  left: 8px;
  top: 7px;
  width: 32px;
  height: 32px;
  font: 28px/32px "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  text-align: center;
  filter: drop-shadow(1px 3px 2px #00385f80);
  transform-origin: 50% 80%;
}
.about-built i::before {
  content: none;
}
.about-built i::after {
  content: none;
}
.about-built em {
  z-index: 3;
  left: -7px;
  right: auto;
  top: 1px;
  opacity: 0;
  font-size: 18px;
  transform-origin: 88% 88%;
}
.desktop-icon[data-app="about"]:hover .about-built i,
.desktop-icon[data-app="about"]:focus-visible .about-built i { animation: portrait-bob 1.05s ease-in-out infinite; }
.desktop-icon[data-app="about"]:hover .about-built em,
.desktop-icon[data-app="about"]:focus-visible .about-built em { animation: portrait-wave .72s ease-in-out infinite; }

/* Envelope: the flap rotates open and a letter rises */
.mail-built::before {
  content: "" !important;
  position: absolute;
  z-index: 5;
  left: 10px;
  top: 16px;
  width: 29px;
  height: 23px;
  border: 1px solid #9fb6ce;
  border-radius: 2px;
  background: repeating-linear-gradient(#fff 0 5px, #d9eaf7 6px 7px);
  opacity: 0;
}
.mail-built em {
  z-index: 2;
  left: 4px;
  top: 17px;
  width: 40px;
  height: 27px;
  border: 2px solid #8e9cb7;
  border-radius: 4px;
  background:
    linear-gradient(32deg, transparent 48%, #c2cbe0 49% 53%, transparent 54%),
    linear-gradient(-32deg, transparent 48%, #dbe1ee 49% 53%, transparent 54%),
    linear-gradient(#f4f5fb, #c8cee0);
  box-shadow: 1px 3px 4px #003d7280;
}
.mail-built i {
  z-index: 3;
  left: 4px;
  top: 17px;
  width: 40px;
  height: 22px;
  clip-path: polygon(0 0, 100% 0, 50% 78%);
  background: linear-gradient(#ffffff, #cfd7e8);
  border-top: 2px solid #8e9cb7;
  transform-origin: 50% 0;
  backface-visibility: visible;
}
.desktop-icon[data-app="contact"]:hover .mail-built i,
.desktop-icon[data-app="contact"]:focus-visible .mail-built i { animation: envelope-flap 1.15s ease-in-out infinite; }
.desktop-icon[data-app="contact"]:hover .mail-built::before,
.desktop-icon[data-app="contact"]:focus-visible .mail-built::before { animation: letter-rise 1.15s ease-in-out infinite; }
.desktop-icon[data-app="contact"]:hover .mail-built em,
.desktop-icon[data-app="contact"]:focus-visible .mail-built em { animation: envelope-lift 1.15s ease-in-out infinite; }

/* Briefcase: separate lid and body */
.case-built em {
  z-index: 1;
  left: 4px;
  bottom: 4px;
  width: 40px;
  height: 25px;
  border: 2px solid #75402f;
  border-radius: 3px 3px 6px 6px;
  background: linear-gradient(#a75b50, #763e43);
  box-shadow: 1px 3px 4px #003d7280, inset 0 -5px 8px #48243866;
}
.case-built em::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 7px;
  width: 6px;
  height: 7px;
  border-radius: 1px;
  background: #d89b61;
  box-shadow: inset 0 1px #ffe0a2;
}
.case-built i {
  z-index: 2;
  left: 4px;
  top: 14px;
  width: 40px;
  height: 14px;
  border: 2px solid #75402f;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(#b26757, #84434a);
  transform-origin: 0 100%;
  box-shadow: inset 0 2px #cd8270;
}
.case-built i::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -10px;
  width: 12px;
  height: 8px;
  border: 3px solid #704336;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.desktop-icon[data-app="resume"]:hover .case-built i,
.desktop-icon[data-app="resume"]:focus-visible .case-built i { animation: briefcase-open 1.18s ease-in-out infinite; }
.desktop-icon[data-app="resume"]:hover .case-built em,
.desktop-icon[data-app="resume"]:focus-visible .case-built em { animation: briefcase-body 1.18s ease-in-out infinite; }

/* Tools: the wrench and hammer rub against each other */
.tools-built i,
.tools-built em {
  z-index: 2;
  left: 7px;
  right: auto;
  top: 7px;
  width: 34px;
  height: 34px;
  font-size: 28px;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(1px 2px 1px #00345b88);
}
.tools-built i { transform: translate(-2px, 1px) rotate(-15deg); transform-origin: 50% 55%; }
.tools-built em { z-index: 3; transform: translate(2px, 1px) scaleX(-1) rotate(-15deg); transform-origin: 50% 55%; }
.tools-built::after {
  content: "✦" !important;
  position: absolute;
  z-index: 4;
  left: 20px;
  top: 15px;
  color: #fff3a0;
  opacity: 0;
  font: 700 19px/1 Arial;
  text-shadow: 0 0 5px #ff9d00;
}
.desktop-icon[data-app="skills"]:hover .tools-built i,
.desktop-icon[data-app="skills"]:focus-visible .tools-built i { animation: wrench-rub .72s ease-in-out infinite alternate; }
.desktop-icon[data-app="skills"]:hover .tools-built em,
.desktop-icon[data-app="skills"]:focus-visible .tools-built em { animation: hammer-rub .72s ease-in-out infinite alternate; }
.desktop-icon[data-app="skills"]:hover .tools-built::after,
.desktop-icon[data-app="skills"]:focus-visible .tools-built::after { animation: friction-spark .72s steps(2, end) infinite; }

/* Graduation cap: only the tassel floats */
.cap-built i {
  z-index: 2;
  left: 2px;
  top: 8px;
  width: 44px;
  height: 32px;
  clip-path: polygon(50% 0, 100% 34%, 76% 47%, 76% 77%, 50% 94%, 24% 77%, 24% 47%, 0 34%);
  background: linear-gradient(145deg, #463982 0 46%, #241c59 47% 100%);
  filter: drop-shadow(1px 3px 2px #00365f99);
}
.cap-built em {
  z-index: 4;
  left: 35px;
  top: 20px;
  width: 2px;
  height: 21px;
  border-radius: 2px;
  background: #f1b63b;
  transform-origin: 50% 0;
  box-shadow: 1px 0 #7c4b18;
}
.cap-built em::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50% 50% 60% 60%;
  background: #f0a728;
  box-shadow: inset 1px 1px #ffe58b;
}
.desktop-icon[data-app="education"]:hover .cap-built em,
.desktop-icon[data-app="education"]:focus-visible .cap-built em { animation: tassel-float 1.05s ease-in-out infinite alternate; }

@keyframes portrait-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-2deg) scale(1.04); }
}
@keyframes portrait-wave {
  0% { opacity: 0; transform: translateY(5px) rotate(-18deg) scale(.6); }
  25% { opacity: 1; }
  55% { opacity: 1; transform: translateY(-2px) rotate(18deg) scale(1); }
  100% { opacity: .7; transform: translateY(0) rotate(-14deg) scale(.92); }
}
@keyframes envelope-flap {
  0%, 18% { transform: rotateX(0); filter: brightness(1); }
  48%, 78% { transform: rotateX(155deg); filter: brightness(.9); }
  100% { transform: rotateX(0); }
}
@keyframes letter-rise {
  0%, 25%, 100% { opacity: 0; transform: translateY(8px); }
  48%, 76% { opacity: 1; transform: translateY(-12px); }
}
@keyframes envelope-lift {
  0%, 100% { transform: translateY(0); }
  48%, 76% { transform: translateY(2px); }
}
@keyframes briefcase-open {
  0%, 20%, 100% { transform: translateY(0) rotateX(0); }
  48%, 78% { transform: translateY(-8px) rotateX(-42deg) rotateZ(-5deg); }
}
@keyframes briefcase-body {
  0%, 100% { transform: translateY(0); }
  48%, 78% { transform: translateY(2px) scaleY(.96); }
}
@keyframes wrench-rub {
  from { transform: translate(-3px, 2px) rotate(-18deg); }
  to { transform: translate(3px, -2px) rotate(-8deg); }
}
@keyframes hammer-rub {
  from { transform: translate(3px, 2px) scaleX(-1) rotate(-18deg); }
  to { transform: translate(-3px, -2px) scaleX(-1) rotate(-8deg); }
}
@keyframes friction-spark {
  0%, 32%, 100% { opacity: 0; transform: scale(.4) rotate(0); }
  48%, 72% { opacity: 1; transform: scale(1.25) rotate(45deg); }
}
@keyframes tassel-float {
  from { transform: rotate(-14deg) translateX(-1px); }
  to { transform: rotate(19deg) translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .built-icon i,
  .built-icon em,
  .built-icon::before,
  .built-icon::after { animation: none !important; }
}

/* Resume content populated from 龚智瑾_AI应用工程师.docx */
.profile-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c7d7ec;
}
.profile-heading > div { min-width: 0; }
.profile-heading small,
.resume-intro small {
  color: #4b79b7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}
.profile-heading h2 { margin-top: 4px; }
.profile-heading .lead { margin: 0; }
.profile-emoji {
  display: grid;
  place-items: center;
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  border: 1px solid #7aa1d4;
  border-radius: 10px;
  background: linear-gradient(145deg, #eef7ff, #b9d5f7);
  box-shadow: inset 1px 1px white, 2px 3px 0 #d0ddeb;
  font-size: 38px;
}
.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.strength-grid article,
.skill-panels article {
  padding: 13px 14px;
  border: 1px solid #bdcce0;
  background: linear-gradient(#fff, #f1f6fc);
  box-shadow: 2px 2px 0 #dce5f0;
}
.strength-grid article b,
.skill-panels article b { color: #1758a7; font-size: 12px; }
.strength-grid article p,
.skill-panels article p { margin: 5px 0 0; color: #4d6078; font-size: 11px; }

.resume-intro {
  margin: -6px -6px 18px;
  padding: 18px 20px;
  border: 1px solid #87a9d4;
  color: #214164;
  background: linear-gradient(135deg, #f9fcff, #d9eaff);
  box-shadow: inset 1px 1px white;
}
.resume-intro h2 { margin: 3px 0 4px; }
.resume-intro p { max-width: 900px; margin: 0; color: #49627f; }
.resume-section {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #b9c9dc;
  border-left: 5px solid #2868b7;
  background: #fbfdff;
  box-shadow: 2px 3px 0 #e3e9f0;
}
.resume-section.project-section { border-left-color: #e59523; }
.resume-section.skills-section { border-left-color: #56a039; }
.resume-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d8e2ef;
}
.resume-section > header h3 {
  margin: 4px 0 2px;
  color: #154e9d;
  font-size: 19px;
}
.resume-section > header p { margin: 0; color: #5a6e86; }
.resume-section > header time {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #9eb8d8;
  color: #285d9f;
  background: #edf5ff;
  font-size: 10px;
  font-weight: 700;
}
.section-label {
  display: inline-block;
  padding: 2px 7px;
  color: white;
  background: #2868b7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.project-section .section-label { background: #d78316; }
.skills-section .section-label { background: #4b9132; }
.section-summary {
  margin: 12px 0 8px;
  color: #354c68;
}
.metric-list,
.honor-box ul {
  margin: 8px 0 13px;
  padding-left: 20px;
}
.metric-list li,
.honor-box li {
  margin: 7px 0;
  color: #334861;
  font-size: 12px;
  line-height: 1.65;
}
.metric-list strong { color: #1263b7; }
.tech-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed #bfd0e3;
}
.tech-line b { margin-right: 3px; color: #35587e; font-size: 10px; }
.tech-line span {
  padding: 3px 7px;
  border: 1px solid #aabdd4;
  border-radius: 2px;
  color: #245a96;
  background: linear-gradient(#fff, #e9f2fc);
  font-size: 9px;
}
.skill-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 13px;
}

.education-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 17px 0;
}
.education-stats article {
  display: grid;
  gap: 3px;
  padding: 15px;
  border: 1px solid #b5c8df;
  background: linear-gradient(#fff, #edf5ff);
  text-align: center;
}
.education-stats b { color: #1757a5; font-size: 18px; }
.education-stats span { color: #62758c; font-size: 10px; }
.honor-box {
  padding: 14px 18px;
  border: 1px solid #d3bd7b;
  background: linear-gradient(135deg, #fffdf4, #fff5cd);
}
.honor-box h3 { margin: 0; color: #916216; font-size: 15px; }
.honor-box ul { margin-bottom: 0; }

.contact-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.contact-list a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border: 1px solid #a9bdd7;
  color: #204e84;
  background: linear-gradient(#fff, #edf4fc);
  text-decoration: none;
  box-shadow: 2px 2px 0 #dbe4ef;
}
.contact-list a:hover,
.contact-list a:focus-visible {
  color: white;
  background: linear-gradient(#3c88e5, #1761bb);
  outline: 1px dotted white;
  outline-offset: -4px;
}
.contact-list a > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 19px;
}
.contact-list a div { min-width: 0; }
.contact-list small,
.contact-list b { display: block; }
.contact-list small { margin-bottom: 2px; opacity: .72; font-size: 9px; }
.contact-list b { overflow-wrap: anywhere; font-size: 12px; }

@media (max-width: 760px) {
  .profile-heading { align-items: flex-start; gap: 11px; }
  .profile-emoji { flex-basis: 50px; width: 50px; height: 50px; font-size: 28px; }
  .strength-grid,
  .skill-panels,
  .education-stats { grid-template-columns: 1fr; }
  .resume-section { padding: 14px; }
  .resume-section > header { display: block; }
  .resume-section > header time { display: inline-block; margin-top: 8px; }
  .diploma { align-items: flex-start; gap: 12px; padding: 14px; }
  .diploma-mark { flex-basis: 48px; width: 48px; height: 48px; font-size: 27px; }
  .contact-card { align-items: flex-start; gap: 12px; padding: 14px; }
  .mail-art { flex-basis: 48px; width: 48px; height: 48px; font-size: 27px; }
}

/* Local talking digital-human MVP */
.digital-built i {
  position: relative;
  z-index: 2;
  font-style: normal;
  font-size: 39px;
  transform-origin: 50% 80%;
}
.digital-built em {
  position: absolute;
  z-index: 1;
  right: -3px;
  top: 11px;
  width: 13px;
  height: 25px;
  border: 2px solid #8fe8ff;
  border-left: 0;
  border-radius: 0 14px 14px 0;
  opacity: 0;
}
.desktop-icon[data-app="avatar"]:hover,
.desktop-icon[data-app="avatar"]:focus-visible { background: #35c2df3b; }
.desktop-icon[data-app="avatar"]:hover .digital-built i,
.desktop-icon[data-app="avatar"]:focus-visible .digital-built i { animation: digital-greet .9s ease-in-out infinite; }
.desktop-icon[data-app="avatar"]:hover .digital-built em,
.desktop-icon[data-app="avatar"]:focus-visible .digital-built em { animation: digital-signal .9s ease-out infinite; }
@keyframes digital-greet {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-3px) rotate(-5deg); }
  65% { transform: translateY(-2px) rotate(4deg); }
}
@keyframes digital-signal {
  0% { opacity: 0; transform: scale(.45); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35); }
}

.digital-human-app {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(340px, 1.28fr);
  gap: 18px;
  min-height: 100%;
}
.avatar-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 20px 16px;
  overflow: hidden;
  border: 1px solid #76a3d8;
  background:
    linear-gradient(#ffffff16 1px, transparent 1px),
    linear-gradient(90deg, #ffffff12 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, #4aa9ed, #1359ac 70%, #073778);
  background-size: 12px 12px, 12px 12px, auto;
  box-shadow: inset 0 0 28px #082c6b99, 2px 3px 0 #d1dce9;
}
.avatar-stage::before {
  content: "DIGITAL TWIN · ONLINE";
  position: absolute;
  left: 12px;
  top: 10px;
  color: #d9f5ff;
  font: 700 9px Tahoma, sans-serif;
  letter-spacing: .1em;
}
.digital-avatar {
  position: relative;
  width: min(248px, 84%);
  aspect-ratio: 1;
  isolation: isolate;
  border: 4px solid white;
  border-radius: 16px;
  background: #49b5ef;
  box-shadow: 0 0 0 2px #174d91, 0 13px 28px #06295388;
  animation: digital-idle 3.4s ease-in-out infinite;
}
.digital-avatar img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
}
.digital-halo {
  position: absolute;
  z-index: -1;
  inset: -12px;
  border: 2px solid #6ee5ff;
  border-radius: 22px;
  opacity: .3;
}
.digital-avatar.speaking .digital-halo { animation: digital-halo-pulse .8s ease-out infinite; }
.digital-avatar.listening .digital-halo {
  border-color: #9dff75;
  opacity: .9;
  animation: digital-listen 1s ease-in-out infinite alternate;
}
.voice-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  color: white;
  font-size: 12px;
  text-shadow: 1px 1px #083b76;
}
.voice-dot {
  width: 8px;
  height: 8px;
  border: 1px solid white;
  border-radius: 50%;
  background: #58d44e;
  box-shadow: 0 0 7px #8dff81;
}
.voice-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 26px;
  margin: 6px 0 8px;
}
.voice-bars i {
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: #bfeaff;
  transform-origin: 50% 50%;
}
.voice-bars.active i,
.voice-bars.listening i { animation: voice-bar .54s ease-in-out infinite alternate; }
.voice-bars i:nth-child(2), .voice-bars i:nth-child(6) { animation-delay: -.16s; }
.voice-bars i:nth-child(3), .voice-bars i:nth-child(5) { animation-delay: -.32s; }
.voice-bars i:nth-child(4) { animation-delay: -.46s; }
.voice-bars.listening i { background: #b7ff9b; }
.voice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.xp-action {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #31598d;
  border-radius: 3px;
  color: #173963;
  background: linear-gradient(#fff, #dbe7f5);
  box-shadow: inset 1px 1px white, 1px 1px 0 #8aa5c5;
  font: 700 12px Tahoma, "Microsoft YaHei", sans-serif;
}
.xp-action:hover,
.xp-action:focus-visible { filter: brightness(.94); outline: 1px dotted #153d72; outline-offset: -4px; }
.xp-action:active { background: linear-gradient(#cad9eb, #fff); box-shadow: inset 1px 1px 2px #7892b2; }
.xp-action.primary { color: white; background: linear-gradient(#4697ed, #1762ba); text-shadow: 1px 1px #0b4a92; }
.xp-action:disabled { opacity: .58; }

.avatar-chat {
  display: grid;
  grid-template-rows: auto minmax(250px, 1fr) auto auto;
  min-height: 430px;
  border: 1px solid #b8c8dc;
  background: #f7faff;
  box-shadow: 2px 3px 0 #dce4ee;
}
.avatar-chat > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px 12px;
  border-bottom: 1px solid #b9cce4;
  background: linear-gradient(#fff, #e8f2ff);
}
.avatar-chat > header small { color: #4d74a2; font-size: 10px; letter-spacing: .08em; }
.avatar-chat > header h2 { margin: 4px 0 0; font-size: 22px; }
.avatar-chat > header > span {
  padding: 4px 8px;
  border: 1px solid #8eadcf;
  color: #2a5c94;
  background: white;
  font-size: 10px;
}
.avatar-chat-log {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  background: linear-gradient(#f8fbff, #edf4fc);
}
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 92%;
}
.chat-row.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-row > span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid #8ea9ca;
  border-radius: 4px;
  background: white;
  font-size: 17px;
}
.chat-row p {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #adc2db;
  border-radius: 3px 9px 9px;
  color: #2f4865;
  background: white;
  box-shadow: 1px 2px 0 #dce6f1;
  font-size: 13px;
  line-height: 1.65;
}
.chat-row.user p {
  border-color: #5d91cc;
  border-radius: 9px 3px 9px 9px;
  color: white;
  background: #347ac8;
}
.avatar-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  padding: 11px;
  border-top: 1px solid #b8c9dd;
  background: #e9f1fb;
}
.avatar-chat-form input {
  min-width: 0;
  height: 34px;
  padding: 6px 9px;
  border: 1px inset #9db2cb;
  color: #203c5f;
  background: white;
  font: 13px Tahoma, "Microsoft YaHei", sans-serif;
}
.avatar-chat-form input:focus { outline: 2px solid #78a9e3; outline-offset: -2px; }
.voice-note {
  margin: 0 !important;
  padding: 0 12px 11px;
  color: #687b91;
  background: #e9f1fb;
  font-size: 10px !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes digital-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes digital-halo-pulse {
  from { opacity: .65; transform: scale(.98); }
  to { opacity: 0; transform: scale(1.08); }
}
@keyframes digital-listen {
  from { transform: scale(.99); box-shadow: 0 0 5px #8dff81; }
  to { transform: scale(1.03); box-shadow: 0 0 18px #8dff81; }
}
@keyframes voice-bar {
  from { height: 4px; opacity: .55; }
  to { height: 24px; opacity: 1; }
}

@media (max-width: 900px) {
  .digital-human-app { grid-template-columns: 1fr; }
  .avatar-stage { min-height: 360px; }
  .avatar-chat { min-height: 410px; }
}
@media (max-width: 760px) {
  .digital-human-app { gap: 10px; }
  .avatar-stage { min-height: 310px; padding: 28px 12px 15px; }
  .digital-avatar { width: min(190px, 72%); }
  .avatar-chat { min-height: 380px; }
  .avatar-chat > header h2 { font-size: 18px; }
  .avatar-chat-form { grid-template-columns: 1fr; }
  .avatar-chat-form button { width: 100%; }
}

/* WeChat-style press-and-hold voice input with live transcription */
.live-transcript {
  width: min(300px, 94%);
  min-height: 42px;
  margin: 0 0 10px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid #8bc5e8;
  border-radius: 4px;
  color: #e9faff;
  background: #052f6cb8;
  box-shadow: inset 1px 1px #72c9f044;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.voice-actions { align-items: center; }
.hold-to-talk {
  display: grid;
  grid-template-columns: 31px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 7px;
  width: 178px;
  min-height: 54px;
  padding: 7px 12px;
  border: 1px solid #1f6226;
  border-radius: 5px;
  color: white;
  background: linear-gradient(#63c958, #2a9d37 52%, #21832c);
  box-shadow: inset 1px 1px #a0ed97, inset -1px -1px #1a7024, 1px 2px 0 #073d66;
  text-align: left;
  text-shadow: 1px 1px #126520;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.hold-to-talk > span {
  grid-row: 1 / 3;
  font-size: 24px;
  text-align: center;
}
.hold-to-talk > b { align-self: end; font-size: 13px; }
.hold-to-talk > small { align-self: start; color: #ddffdf; font-size: 9px; }
.hold-to-talk:hover,
.hold-to-talk:focus-visible {
  filter: brightness(1.05);
  outline: 1px dotted white;
  outline-offset: -5px;
}
.hold-to-talk.holding {
  color: #123d69;
  background: linear-gradient(#d9e5f2, #b8c9da);
  border-color: #7894af;
  box-shadow: inset 2px 2px 3px #667d9666, 1px 1px white;
  text-shadow: none;
  transform: translateY(1px);
}
.hold-to-talk.holding > small { color: #3d6288; }
.hold-to-talk.holding > span { animation: mic-pulse .55s ease-in-out infinite alternate; }
.hold-to-talk:disabled { opacity: .55; filter: grayscale(.5); }
@keyframes mic-pulse {
  from { transform: scale(.92); }
  to { transform: scale(1.13); }
}

@media (max-width: 760px) {
  .live-transcript { width: 100%; }
  .voice-actions { width: 100%; }
  .hold-to-talk { flex: 1 1 170px; width: auto; }
}

/* Classic QQ-inspired digital-human chat */
.window-content.qq-mode {
  padding: 7px;
  overflow: hidden;
  background: #c8dcf2;
}
.qq-chat-shell {
  display: grid;
  grid-template-rows: 66px 36px minmax(0, 1fr) 23px;
  width: 100%;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid #4a79aa;
  border-radius: 4px;
  color: #253f5d;
  background: #eaf3fc;
  box-shadow: inset 1px 1px white, 2px 2px 0 #8aa9c9;
  font-family: Tahoma, "Microsoft YaHei", sans-serif;
}
.qq-contact-header {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 7px 13px;
  color: white;
  background:
    radial-gradient(circle at 18% 0, #bceaff55, transparent 36%),
    linear-gradient(#51a5e9, #1c73c3 54%, #1163ad);
  border-bottom: 1px solid #0b4f95;
  text-shadow: 1px 1px #174e82;
}
.qq-mini-avatar {
  flex: 0 0 49px;
  width: 49px;
  height: 49px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid white;
  border-radius: 5px;
  background: #daf2ff;
  box-shadow: 1px 2px 2px #14558c;
}
.qq-mini-avatar img { display: block; width: 100%; height: 100%; border-radius: 3px; object-fit: cover; }
.qq-contact-header > div { min-width: 0; }
.qq-contact-header h2 {
  margin: 0 0 4px;
  overflow: hidden;
  color: white;
  font: 700 17px Tahoma, "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qq-contact-header p { margin: 0; color: #e4f5ff; font-size: 11px; }
.qq-contact-header p i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border: 1px solid white;
  border-radius: 50%;
  background: #55dc3e;
  box-shadow: 0 0 4px #b7ffaf;
}
.qq-signature {
  margin-left: auto;
  overflow: hidden;
  color: #e5f5ff;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.qq-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-top: 1px solid #90c9f2;
  border-bottom: 1px solid #7797b8;
  background: linear-gradient(#f8fbfe, #ceddec);
}
.qq-toolbar button,
.qq-compose-tools button {
  height: 27px;
  padding: 3px 9px;
  border: 1px solid transparent;
  color: #31587d;
  background: transparent;
  font: 11px Tahoma, "Microsoft YaHei", sans-serif;
}
.qq-toolbar button:hover,
.qq-compose-tools button:hover {
  border-color: #7ca2c7;
  border-radius: 3px;
  background: linear-gradient(#fff, #d9e8f6);
}
.qq-chat-main {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 0;
}
.qq-profile-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 18px 12px 12px;
  border-right: 1px solid #7ca0c3;
  background:
    linear-gradient(#ffffff66 1px, transparent 1px),
    linear-gradient(90deg, #ffffff55 1px, transparent 1px),
    linear-gradient(150deg, #e8f6ff, #9dd0ee 54%, #65addb);
  background-size: 12px 12px, 12px 12px, auto;
}
.qq-profile-panel .digital-avatar {
  width: min(148px, 90%);
  border-width: 3px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px #5384b0, 0 7px 14px #39759c77;
}
.qq-profile-panel .digital-avatar img { border-radius: 4px; }
.qq-profile-panel h3 { margin: 13px 0 2px; color: #164e84; font-size: 15px; }
.qq-profile-panel > p { margin: 0; color: #4b7397; font-size: 10px; }
.qq-profile-panel .voice-state {
  max-width: 100%;
  margin-top: 13px;
  color: #21537c;
  text-align: center;
  text-shadow: none;
}
.qq-profile-panel .voice-state b { overflow-wrap: anywhere; font-size: 10px; }
.qq-profile-panel .voice-bars { margin: 4px 0; }
.qq-profile-panel .voice-bars i { background: #277fbd; }
.qq-local-badge {
  margin-top: 4px;
  padding: 4px 7px;
  border: 1px solid #6796bb;
  border-radius: 10px;
  color: #27658f;
  background: #eef9ff99;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
}
.qq-conversation {
  display: grid;
  grid-template-rows: minmax(160px, 1fr) 31px auto 43px 64px auto;
  min-width: 0;
  min-height: 0;
  background: white;
}
.qq-conversation .avatar-chat-log {
  min-height: 0;
  padding: 13px 16px;
  overflow: auto;
  background: #f9fcff;
}
.qq-time {
  align-self: center;
  margin: 2px auto 6px;
  color: #8c9bab;
  font-size: 10px;
}
.qq-conversation .chat-row {
  width: 100%;
  max-width: 94%;
  gap: 9px;
}
.qq-conversation .chat-row.user { align-self: flex-end; }
.qq-conversation .chat-row > span {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 1px;
  overflow: hidden;
  border-color: #78a1c8;
  background: #edf7ff;
}
.qq-conversation .chat-row > span img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qq-conversation .chat-row > div { min-width: 0; }
.qq-conversation .chat-row > div > b {
  display: block;
  margin-bottom: 3px;
  color: #2a74b2;
  font-size: 10px;
  font-weight: 500;
}
.qq-conversation .chat-row.user > div > b { color: #559024; text-align: right; }
.qq-conversation .chat-row p {
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #c2d5e6;
  border-radius: 2px;
  color: #263f59;
  background: #edf7ff;
  box-shadow: 1px 1px 0 white inset;
  font-size: 12px;
  line-height: 1.6;
}
.qq-conversation .chat-row.user p {
  border-color: #bfd5a8;
  color: #304a28;
  background: #ecf8df;
}
.qq-compose-tools {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 1px 7px;
  border-top: 1px solid #9fb6cc;
  border-bottom: 1px solid #cad6e1;
  background: linear-gradient(#f8fbfd, #e1e9f1);
}
.qq-compose-tools button { padding: 2px 6px; font-size: 10px; }
.qq-compose-tools span { margin-left: auto; color: #4b6d8d; font-size: 10px; }
.qq-conversation .live-transcript {
  width: auto;
  min-height: 0;
  margin: 6px 9px 0;
  padding: 5px 8px;
  border-color: #d0bb74;
  color: #735b17;
  background: #fff8d8;
  box-shadow: none;
  font-size: 10px;
  text-align: left;
}
.qq-conversation .avatar-chat-form {
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 6px;
  padding: 5px 9px 4px;
  border: 0;
  background: white;
}
.qq-conversation .avatar-chat-form input {
  height: 34px;
  border: 1px solid #8ca9c4;
  font-size: 12px;
}
.qq-send-button {
  border: 1px solid #4779a6;
  border-radius: 3px;
  color: #173e65;
  background: linear-gradient(#fff, #cbddec);
  box-shadow: inset 1px 1px white;
  font: 700 11px Tahoma, "Microsoft YaHei", sans-serif;
}
.qq-send-button:hover { background: linear-gradient(#eaf6ff, #b7d2e8); }
.qq-conversation .voice-actions {
  justify-content: flex-end;
  padding: 5px 9px;
  border-top: 1px solid #d7e1ea;
  background: #f5f8fb;
}
.qq-conversation .hold-to-talk { width: 182px; min-height: 51px; }
.qq-conversation .xp-action { min-height: 31px; }
.qq-conversation .voice-note {
  padding: 4px 10px 6px;
  color: #6e7f8f;
  background: #f5f8fb;
  font-size: 9px !important;
  text-align: right;
}
.qq-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-top: 1px solid #8aa7c4;
  color: #456786;
  background: linear-gradient(#edf4fa, #cbdce9);
  font-size: 9px;
}
.qq-status-bar span:first-child { color: #3b8d2a; }

@media (max-width: 900px) {
  .window-content.qq-mode { overflow: auto; }
  .qq-chat-shell { height: auto; min-height: 740px; }
  .qq-chat-main { grid-template-columns: 150px minmax(0, 1fr); }
  .qq-profile-panel .digital-avatar { width: 116px; }
  .qq-signature { display: none; }
}
@media (max-width: 620px) {
  .qq-chat-shell { min-height: 820px; grid-template-rows: 62px 34px auto 23px; }
  .qq-toolbar button { padding-inline: 5px; font-size: 9px; }
  .qq-toolbar button:nth-child(n+4) { display: none; }
  .qq-chat-main { grid-template-columns: 1fr; }
  .qq-profile-panel {
    display: grid;
    grid-template-columns: 78px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid #7ca0c3;
  }
  .qq-profile-panel .digital-avatar { grid-row: 1 / 4; width: 74px; }
  .qq-profile-panel h3 { margin: 0; }
  .qq-profile-panel .voice-state { margin: 3px 0 0; justify-self: start; }
  .qq-profile-panel .voice-bars,
  .qq-local-badge { display: none; }
  .qq-conversation { min-height: 610px; }
  .qq-compose-tools button:nth-child(n+3) { display: none; }
  .qq-conversation .avatar-chat-form { grid-template-columns: 1fr; }
  .qq-send-button { min-height: 31px; }
  .qq-conversation .voice-actions { justify-content: stretch; }
  .qq-conversation .hold-to-talk { flex: 1 1 160px; width: auto; }
}

/* WeChat-inspired digital-human conversation */
.window-content.wechat-mode {
  padding: 0;
  overflow: hidden;
  background: #ededed;
}
.wechat-shell {
  display: grid;
  grid-template-columns: 48px 238px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 510px;
  overflow: hidden;
  color: #222;
  background: #ededed;
  font-family: "Microsoft YaHei", Tahoma, sans-serif;
}
.wechat-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 11px 0 10px;
  background: #2e2e2e;
}
.wechat-self-avatar {
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #ddd;
}
.wechat-self-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wechat-rail-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 0;
  color: #aaa;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}
.wechat-rail-button:hover,
.wechat-rail-button.active { color: #07c160; background: #252525; }
.wechat-rail-spacer { flex: 1; }
.wechat-contacts {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid #d5d5d5;
  background: #f7f7f7;
}
.wechat-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 2px;
  padding: 12px 10px 9px;
  color: #888;
  background: #f1f1f1;
}
.wechat-search input {
  min-width: 0;
  height: 26px;
  padding: 4px 6px;
  border: 0;
  border-radius: 3px;
  outline: 0;
  color: #444;
  background: #dedede;
  font-size: 12px;
}
.wechat-search button {
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: #555;
  background: #dedede;
  font-size: 18px;
}
.wechat-contact {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 0;
  text-align: left;
  background: transparent;
}
.wechat-contact.active { background: #dedede; }
.wechat-contact > span {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 3px;
}
.wechat-contact img { width: 100%; height: 100%; object-fit: cover; }
.wechat-contact div { min-width: 0; }
.wechat-contact b,
.wechat-contact small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wechat-contact b { margin-bottom: 6px; color: #222; font-size: 13px; font-weight: 500; }
.wechat-contact small,
.wechat-contact time { color: #999; font-size: 10px; }
.wechat-contact time { align-self: start; margin-top: 2px; }
.wechat-profile {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px 14px 18px;
  border-top: 1px solid #e6e6e6;
}
.wechat-profile .digital-avatar {
  width: min(136px, 82%);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px #0002;
}
.wechat-profile .digital-avatar img { border-radius: 8px; }
.wechat-profile h3 { margin: 12px 0 3px; font-size: 15px; font-weight: 500; }
.wechat-profile > p { margin: 0; color: #888; font-size: 11px; }
.wechat-profile .voice-state {
  max-width: 100%;
  margin-top: 12px;
  color: #555;
  text-align: center;
  text-shadow: none;
}
.wechat-profile .voice-state b { overflow-wrap: anywhere; font-size: 10px; font-weight: 500; }
.wechat-profile .voice-bars { margin: 5px 0; }
.wechat-profile .voice-bars i { background: #07c160; }
.wechat-local-badge {
  padding: 4px 8px;
  border-radius: 10px;
  color: #3c8d5d;
  background: #dff4e7;
  font-size: 9px;
}
.wechat-conversation {
  display: grid;
  grid-template-rows: 58px minmax(170px, 1fr) auto auto;
  min-width: 0;
  min-height: 0;
  background: #ededed;
}
.wechat-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #d6d6d6;
}
.wechat-chat-header h2 { margin: 0 0 3px; color: #222; font-size: 15px; font-weight: 500; }
.wechat-chat-header span { color: #888; font-size: 10px; }
.wechat-chat-header span i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #07c160;
}
.wechat-chat-header button {
  border: 0;
  color: #555;
  background: transparent;
  font-size: 20px;
  letter-spacing: 2px;
}
.wechat-conversation .avatar-chat-log {
  min-height: 0;
  padding: 13px 22px;
  overflow: auto;
  background: #ededed;
}
.wechat-time {
  align-self: center;
  margin: 2px auto 4px;
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
  background: #cecece;
  font-size: 9px;
}
.wechat-conversation .chat-row { max-width: 88%; gap: 9px; }
.wechat-conversation .chat-row > span {
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: #fff;
}
.wechat-conversation .chat-row > span img { width: 100%; height: 100%; object-fit: cover; }
.wechat-conversation .chat-row > div { min-width: 0; }
.wechat-conversation .chat-row > div > b { display: none; }
.wechat-conversation .chat-row p {
  position: relative;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #dedede;
  border-radius: 4px;
  color: #222;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.55;
}
.wechat-conversation .chat-row.bot p::before,
.wechat-conversation .chat-row.user p::after {
  position: absolute;
  top: 11px;
  width: 8px;
  height: 8px;
  content: "";
  transform: rotate(45deg);
}
.wechat-conversation .chat-row.bot p::before {
  left: -5px;
  border-bottom: 1px solid #dedede;
  border-left: 1px solid #dedede;
  background: #fff;
}
.wechat-conversation .chat-row.user { align-self: flex-end; }
.wechat-conversation .chat-row.user p {
  border-color: #8fcf70;
  color: #222;
  background: #95ec69;
}
.wechat-conversation .chat-row.user p::after {
  right: -5px;
  border-top: 1px solid #8fcf70;
  border-right: 1px solid #8fcf70;
  background: #95ec69;
}
.wechat-conversation .live-transcript {
  width: auto;
  min-height: 0;
  margin: 0 18px 8px;
  padding: 6px 9px;
  border: 1px solid #d8d1ae;
  border-radius: 3px;
  color: #7a6627;
  background: #fffbe6;
  box-shadow: none;
  font-size: 10px;
  text-align: left;
}
.wechat-compose {
  padding: 7px 14px 9px;
  border-top: 1px solid #d6d6d6;
  background: #f7f7f7;
}
.wechat-compose-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
}
.wechat-compose-tools button {
  height: 25px;
  padding: 0 5px;
  border: 0;
  color: #555;
  background: transparent;
  font-size: 15px;
}
.wechat-compose-tools button:hover { color: #07c160; }
.wechat-compose-tools span { flex: 1; }
.wechat-compose-tools #voice-stop { color: #777; font-size: 10px; }
.wechat-compose-tools .microphone-select {
  width: min(220px, 42%);
  height: 25px;
  padding: 2px 24px 2px 7px;
  overflow: hidden;
  border: 1px solid #d4d4d4;
  border-radius: 3px;
  color: #555;
  background: #fff;
  font: 10px "Microsoft YaHei", sans-serif;
  text-overflow: ellipsis;
}
.wechat-compose-tools .microphone-select:focus {
  border-color: #07c160;
  outline: 1px solid #07c160;
}
.wechat-conversation .avatar-chat-form {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 3px 0 7px;
  border: 0;
  background: transparent;
}
.wechat-conversation .avatar-chat-form input {
  height: 35px;
  padding: 6px 9px;
  border: 1px solid #d5d5d5;
  border-radius: 3px;
  color: #222;
  background: #fff;
  font-size: 12px;
}
.wechat-conversation .avatar-chat-form input:focus {
  border-color: #8acaa4;
  outline: 1px solid #8acaa4;
}
.wechat-send-button {
  border: 0;
  border-radius: 3px;
  color: white;
  background: #07c160;
  font: 500 12px "Microsoft YaHei", sans-serif;
}
.wechat-send-button:hover { background: #06ad56; }
.wechat-conversation .hold-to-talk {
  position: relative;
  width: 100%;
  min-height: 43px;
  grid-template-columns: 28px auto auto;
  grid-template-rows: 1fr;
  justify-content: center;
  border-color: #d5d5d5;
  color: #333;
  background: #fff;
  box-shadow: none;
  text-shadow: none;
  overflow: hidden;
}
.wechat-conversation .hold-to-talk::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--mic-level, 0) * 100%);
  height: 4px;
  content: "";
  background: #07c160;
  transition: width .08s linear;
}
.wechat-conversation .hold-to-talk > * { position: relative; z-index: 1; }
.wechat-conversation .hold-to-talk > span { grid-row: 1; }
.wechat-conversation .hold-to-talk > b { grid-column: 2; grid-row: 1; }
.wechat-conversation .hold-to-talk > small { grid-column: 3; grid-row: 1; color: #888; }
.wechat-conversation .hold-to-talk:hover { border-color: #8acaa4; background: #f5fff8; }
.wechat-conversation .hold-to-talk.holding { color: white; border-color: #06ad56; background: #07c160; }
.wechat-conversation .hold-to-talk.holding > small { color: #eaffef; }
.wechat-conversation .voice-note {
  padding: 6px 0 0;
  color: #999;
  background: transparent;
  font-size: 9px !important;
  text-align: center;
}

@media (max-width: 900px) {
  .window-content.wechat-mode { overflow: auto; }
  .wechat-shell { grid-template-columns: 44px 190px minmax(430px, 1fr); min-height: 650px; }
  .wechat-profile .digital-avatar { width: 106px; }
}
@media (max-width: 680px) {
  .wechat-shell { grid-template-columns: 42px minmax(0, 1fr); min-height: 720px; }
  .wechat-contacts { display: none; }
  .wechat-chat-header { padding-inline: 14px; }
  .wechat-conversation .avatar-chat-log { padding-inline: 14px; }
}

/* The XP file-window sidebar rules target every nested aside. Restore the
   two WeChat columns explicitly so the conversation cannot collapse. */
.window-layout,
.window-content.wechat-mode,
.wechat-shell,
.wechat-conversation {
  width: 100%;
  min-width: 0;
}
.window-layout:has(.window-content.wechat-mode) {
  grid-template-columns: minmax(0, 1fr);
}
.window-layout .wechat-shell > .wechat-rail {
  display: flex;
  padding: 11px 0 10px;
  overflow: hidden;
  color: #aaa;
  background: #2e2e2e;
}
.window-layout .wechat-shell > .wechat-contacts {
  display: flex;
  padding: 0;
  overflow: hidden;
  color: #222;
  background: #f7f7f7;
}
.window-layout .wechat-contacts small {
  display: block;
  margin: 0;
  padding: 0;
  color: #999;
  font-size: 10px;
  line-height: 1.2;
}
.window-layout .wechat-profile > p {
  margin: 0;
  padding: 0;
  color: #888;
  font-size: 11px;
}
.window-layout .wechat-profile h3 {
  display: block;
  margin: 12px 0 3px;
  padding: 0;
  color: #222;
  background: none;
  border-radius: 0;
  font-size: 15px;
}
.window-layout .wechat-profile > p::before { content: none; }

@media (max-width: 680px) {
  .window-layout .wechat-shell > .wechat-contacts { display: none; }
}

/* Frameless digital-human app: native WeChat surface inside the XP desktop. */
.xp-window.avatar-window {
  width: min(1320px, 94%);
  height: min(790px, 90%);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #ededed;
  box-shadow: 0 16px 45px #001b3a80, 0 0 0 1px #ffffff88;
}
.xp-window.avatar-window > .window-bar,
.xp-window.avatar-window > .window-menu,
.xp-window.avatar-window > .window-toolbar,
.xp-window.avatar-window > .status-bar {
  display: none;
}
.xp-window.avatar-window > .window-layout {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
}
.xp-window.avatar-window > .window-layout > aside { display: none; }
.xp-window.avatar-window .window-content.wechat-mode {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.xp-window.avatar-window .wechat-shell {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(250px, 32%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d0d0d0;
  border-radius: 7px;
  background: #ededed;
}
.window-layout .wechat-shell > .wechat-avatar-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  color: #222;
  border-right: 1px solid #d5d5d5;
  background: linear-gradient(145deg, #f7f7f7 0%, #eeeeee 62%, #e5f3e9 100%);
}
.wechat-avatar-panel .wechat-profile {
  width: 100%;
  padding: 30px 24px;
}
.wechat-avatar-panel .digital-avatar {
  width: min(260px, 76%);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 13px 35px #17251c29;
}
.wechat-avatar-panel .digital-avatar img { border-radius: 13px; }
.window-layout .wechat-avatar-panel .wechat-profile h3 {
  margin: 18px 0 5px;
  padding: 0;
  color: #202020;
  background: none;
  font-size: 22px;
  font-weight: 500;
}
.window-layout .wechat-avatar-panel .wechat-profile > p {
  margin: 0;
  padding: 0;
  color: #777;
  font-size: 13px;
  text-align: center;
}
.wechat-avatar-panel .voice-state { margin-top: 22px; }
.wechat-avatar-panel .voice-state b { font-size: 12px; }
.wechat-avatar-panel .voice-bars { height: 32px; margin: 8px 0; }
.wechat-avatar-panel .voice-bars i { background: #07c160; }
.wechat-avatar-panel .wechat-local-badge {
  margin-top: 3px;
  padding: 6px 11px;
  color: #287c49;
  background: #d9f2e2;
  font-size: 10px;
}
.xp-window.avatar-window .wechat-conversation {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.wechat-chat-header .wechat-close {
  width: 38px;
  height: 30px;
  margin-right: -10px;
  border-radius: 3px;
  color: #777;
  font: 300 23px/1 Arial, sans-serif;
}
.wechat-chat-header .wechat-close:hover {
  color: white;
  background: #e64a45;
}

@media (max-width: 760px) {
  .xp-window.avatar-window {
    width: 96%;
    height: 86%;
  }
  .xp-window.avatar-window .wechat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 190px minmax(0, 1fr);
  }
  .window-layout .wechat-shell > .wechat-avatar-panel {
    display: flex;
    border-right: 0;
    border-bottom: 1px solid #d5d5d5;
  }
  .wechat-avatar-panel .wechat-profile {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 18px;
    align-content: center;
    justify-items: start;
    padding: 14px 22px;
  }
  .wechat-avatar-panel .digital-avatar {
    grid-row: 1 / 5;
    width: 118px;
  }
  .window-layout .wechat-avatar-panel .wechat-profile h3 { margin: 0 0 3px; }
  .window-layout .wechat-avatar-panel .wechat-profile > p { text-align: left; }
  .wechat-avatar-panel .voice-state { margin-top: 10px; }
  .wechat-avatar-panel .voice-bars { display: none; }
}
