/* Light diffuse palette; component geometry and all editing IDs are preserved. */
body.light-theme{--paper:#eef4f5;--surface:#ffffffbf;--ink:#263943;--muted:#60767c;--gold:#397681;--line:#456c7824;background:#eef4f5;color:var(--ink);isolation:isolate}
body.light-theme::before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 14% 17%,#cddfe99c,transparent 48%),radial-gradient(ellipse at 86% 30%,#cce5df96,transparent 44%),radial-gradient(ellipse at 53% 90%,#dbeae6a6,transparent 46%),radial-gradient(ellipse at 75% 65%,#d3e2eb6b,transparent 48%),#eef4f5}
body.light-theme main{margin-left:210px;padding:28px 46px 65px;max-width:1700px}
body.light-theme main>.report-chapter{background:transparent;border:0;padding:45px 0 20px}
body.light-theme #reflection{background:transparent;color:var(--ink);--muted:#60767c;--line:#456c7824}
body.light-theme .chapter-header{padding-bottom:28px}
body.light-theme .chapter-heading{margin-top:24px}
body.light-theme .chapter-header .section-head{border-color:var(--line)}
body.light-theme .chapter-header>p{margin-top:14px}
body.light-theme .gradient-panel{position:relative;isolation:isolate;margin:26px 0 0;padding:34px 36px 38px;border:1px solid #ffffffd9;border-radius:26px;background:linear-gradient(135deg,#ffffffde,#edf4f6db 60%,#eaf4f0d9);box-shadow:0 12px 38px -24px #355e6b40,0 1px 0 #ffffffb3 inset;overflow:visible;scroll-margin-top:28px}
body.light-theme .gradient-panel:nth-of-type(even){background:linear-gradient(130deg,#fffffff0,#eaf2f6cf 60%,#e5eef3c7)}
body.light-theme .gradient-panel:nth-of-type(3n){background:linear-gradient(135deg,#ffffffeb,#edf5f2e0 60%,#e5efedc7)}
body.light-theme main>.feature-panel{padding:32px 36px;border:1px solid #ffffffdb;border-radius:28px;background:linear-gradient(135deg,#ffffffe8,#eaf2f6e0 58%,#e7f2eed6);box-shadow:0 14px 44px -28px #35576644;margin-bottom:28px;overflow:hidden}
body.light-theme main>.spine-cover-home{padding:0;min-height:0;background:linear-gradient(145deg,#f5faf9e8,#edf4f6de 55%,#e9f2f0de);scroll-margin-top:24px}
body.light-theme .spine-cover-frame{background:transparent}
body.light-theme #contents{min-height:0;padding-bottom:40px}
body.light-theme #closing{min-height:420px;margin-top:30px;color:var(--ink)}
body.light-theme #closing p,body.light-theme #closing footer{color:var(--muted)}
body.light-theme .project-collection{margin-top:28px;background:transparent}
body.light-theme .project-card{border-color:#ffffffd9;background:linear-gradient(140deg,#ffffffed,#eaf3f6e8);box-shadow:0 16px 42px -28px #555e804f;border-radius:22px;top:calc(24px + var(--card-index)*20px)}
body.light-theme .project-card:nth-child(2){background:linear-gradient(140deg,#fffefd,#eaf2f3e8)}
body.light-theme .project-card:nth-child(3){background:linear-gradient(140deg,#fffffdeb,#eaf4f1e8)}
body.light-theme .project-stack.has-open>.project-card{top:auto}
body.light-theme .efficiency,body.light-theme .manual-details{background:linear-gradient(130deg,#e4eff3a6,#deeeeaa6);border:1px solid #ffffffa6;border-radius:18px}
body.light-theme .contents-row:hover{background:#cfe5e466;border-radius:12px}
body.light-theme .reading-detail{border-color:var(--line)}
body.light-theme>.side-dock{position:fixed;left:22px;right:auto;top:50%;bottom:auto;transform:translateY(-50%);height:auto;width:166px;padding:18px 12px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:20px;background:#ffffffe0;color:var(--ink);border:1px solid #ffffffeb;border-radius:26px;box-shadow:0 14px 40px -22px #355d6e50;backdrop-filter:blur(20px);z-index:50;max-height:calc(100svh - 32px);overflow-y:auto}
body.light-theme .side-dock .brand{justify-content:center;gap:9px;font-size:25px;letter-spacing:-1px;flex-wrap:wrap}
body.light-theme .side-dock .brand span{font-family:var(--font-body);font-size:11px;letter-spacing:.5px;max-width:none}
body.light-theme .side-dock nav{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}
body.light-theme .side-dock nav a{display:flex;align-items:center;gap:10px;padding:10px 9px;border-radius:13px;white-space:nowrap;transition:background .2s,color .2s}
body.light-theme .side-dock nav a::after{display:none}
body.light-theme .side-dock nav a.active,body.light-theme .side-dock nav a:hover{background:#d6e9e9a6;color:#285e6a}
.dock-number{display:grid;place-items:center;min-width:24px;height:24px;font:12px/1 Georgia,serif;color:#4c7f89;border:1px solid #9bbfc666;border-radius:8px}
body.light-theme .side-dock .tools{display:flex;flex-direction:column;gap:7px;padding-top:12px;border-top:1px solid var(--line)}
body.light-theme .side-dock .tools button{font-size:11px;border:1px solid #608e9826;color:var(--ink);background:#ffffff80;padding:7px 8px;border-radius:11px}
body.light-theme .side-dock .tools button:last-child{background:#397681;color:white;border-color:#397681}
body.light-theme #editbar{left:220px;right:24px;top:12px;border:1px solid #ffffffd9;background:#f3f8f7ed;border-radius:18px;max-height:190px}
body.light-theme.editing main{padding-top:160px}
body.light-theme.editing .gradient-panel{outline-offset:2px}
body.light-theme .page-controls{background:#ffffffe6;color:var(--ink);border:1px solid #ffffffed;border-radius:16px;box-shadow:0 8px 30px #355d6e20}
html{scroll-padding-top:28px}
@media(min-width:1700px){body.light-theme main{margin-right:auto;margin-left:220px}}
@media(max-width:1100px){body.light-theme main{margin-left:178px;padding:24px 26px 50px}body.light-theme>.side-dock{left:14px;width:148px;padding:16px 10px}body.light-theme .gradient-panel,body.light-theme main>.feature-panel{padding:28px}body.light-theme main>.spine-cover-home{padding:0}body.light-theme #editbar{left:182px;right:16px}}
@media(max-width:760px){body.light-theme main{margin-left:0;padding:16px 16px 145px}body.light-theme>.side-dock{left:12px;right:12px;top:auto;bottom:12px;transform:none;width:auto;max-height:none;padding:9px 12px;gap:7px;border-radius:22px;overflow:visible}body.light-theme .side-dock .brand{display:none}body.light-theme .side-dock nav{flex-direction:row;justify-content:space-between;gap:2px}body.light-theme .side-dock nav a{display:flex!important;flex-direction:column;gap:4px;padding:5px 7px;font-size:10px}body.light-theme .dock-number{height:20px;min-width:20px;font-size:10px}body.light-theme .side-dock .tools{flex-direction:row;justify-content:center;padding:6px 0 0;gap:8px}body.light-theme .side-dock .tools button{font-size:10px;padding:4px 12px}body.light-theme .gradient-panel,body.light-theme main>.feature-panel{padding:24px 20px;border-radius:22px}body.light-theme main>.spine-cover-home{padding:0}body.light-theme main>.report-chapter{padding:26px 0 8px}body.light-theme #editbar{left:10px;right:10px;top:8px;max-height:210px}body.light-theme.editing main{padding-top:200px}body.light-theme .page-controls{bottom:145px;right:14px}body.light-theme .project-card{position:relative;top:auto;padding:20px}body.light-theme .chapter-heading{gap:14px}body.light-theme #closing{min-height:340px}}
@media(prefers-reduced-transparency:reduce){body.light-theme>.side-dock{background:#f6fafb}body.light-theme .gradient-panel{background:#f2f7f8}}
@media print{body.light-theme{background:white}body.light-theme::before,body.light-theme>.side-dock{display:none}body.light-theme main{margin:0;padding:0}body.light-theme .gradient-panel,body.light-theme main>.feature-panel{box-shadow:none;background:white;border:1px solid #ddd}body.light-theme .spine-cover-home{padding:0}}
/* Frosted cyan glass: diffuse blue-green color, fine grain and broad water ripples. */
body.light-theme{--paper:#edf5f7;--ink:#203e4a;--muted:#526f7c;--gold:#207a8d;background:#edf5f7}
body.light-theme::before{background:radial-gradient(ellipse at 104% -12%,#008cc2b5 0%,#059bcc54 26%,transparent 53%),radial-gradient(ellipse at 14% 4%,#62dedb9c 0%,transparent 44%),radial-gradient(ellipse at 66% 45%,#8edbd980,transparent 48%),linear-gradient(156deg,#dcf4f6,#eff6f9 54%,#f8fafb 78%,#dcebf4);}
body.light-theme::after{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.38;background-image:url('assets/frost-grain.svg'),repeating-radial-gradient(ellipse at 110% -28%,transparent 0 96px,#ffffff70 98px 100px,transparent 104px 145px,#74b8cb24 148px 150px,transparent 155px 204px);background-size:180px 180px,100% 100%;mix-blend-mode:soft-light;}
body.light-theme .gradient-panel,body.light-theme .gradient-panel:nth-of-type(even),body.light-theme main>.feature-panel{background:linear-gradient(132deg,#ffffffbf,#e5f5f4a6 58%,#d6eaf5a6);border:1px solid #ffffffe6;box-shadow:0 16px 45px -32px #286e8759,0 1px 0 #ffffffd9 inset;backdrop-filter:blur(24px) saturate(1.12);}
body.light-theme .project-card{background:linear-gradient(132deg,#f5fcfce8,#e3f3f2e8 58%,#d8eaf5eb);border-color:#ffffffe6;backdrop-filter:blur(20px);}
body.light-theme main{width:calc(100% - 210px);max-width:1700px;margin-left:max(210px,calc((100vw - 1700px + 210px)/2));margin-right:auto;}
body.light-theme .personal-intro-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,280px);align-items:start;gap:40px;}
body.light-theme .profile-with-photo{display:block;padding-bottom:24px;}
body.light-theme .portrait-frame{position:relative;margin:0;aspect-ratio:4/5;border-radius:22px;overflow:hidden;border:1px solid #ffffffd9;background:#daedf1;box-shadow:0 12px 30px -20px #37677a70;}
body.light-theme .portrait-frame img{width:100%;height:100%;display:block;object-fit:cover;mix-blend-mode:normal;}
body.light-theme .portrait-upload{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#f8ffffd9;border:1px solid white;border-radius:100px;padding:9px 16px;font-size:14px;color:#285c6b;backdrop-filter:blur(12px);cursor:pointer;}
body.light-theme .text-movement{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding-top:9px;border-top:1px solid #2d6a7c22;margin-top:8px;font-size:12px;}
body.light-theme .text-movement[hidden]{display:none;}
body.light-theme .text-movement button{min-width:30px;min-height:30px;}
body.light-theme .text-movement input{width:48px;}
#text-drag{touch-action:none;cursor:move;}
body.editing main [data-copy]:hover{outline:1px dashed #2c899b80;outline-offset:3px;}
body.editing main .text-selected{outline:2px solid #21899c;outline-offset:4px;position:relative;z-index:4;}
body.editing main .pdf-page .text-selected{position:absolute;}
body.light-theme.presenting>.side-dock{display:none;}
body.light-theme.presenting main{width:100%;max-width:1450px;margin-left:auto;margin-right:auto;padding:32px 46px 65px;}
body.light-theme.presenting .page-controls{bottom:20px;}
@media(min-width:1700px){body.light-theme main{margin-left:max(210px,calc((100vw - 1700px + 210px)/2));}body.light-theme.presenting main{margin-inline:auto;}}
@media(max-width:1100px){body.light-theme main{width:calc(100% - 178px);margin-left:178px;}body.light-theme .personal-intro-layout{grid-template-columns:minmax(0,1fr) 210px;gap:26px;}body.light-theme.presenting main{width:100%;margin-inline:auto;}}
@media(max-width:760px){body.light-theme main{width:100%;margin-left:0;}body.light-theme .personal-intro-layout{grid-template-columns:1fr;}body.light-theme .portrait-module{max-width:280px;justify-self:center;}body.light-theme.presenting main{padding:20px 16px 70px;}body.light-theme.presenting .page-controls{bottom:16px;}}
@media print{body.light-theme::after{display:none}.portrait-upload{display:none}body.light-theme main{width:100%;margin:0}}
/* Inline labels also need a transformable box for independent positioning. */
main span[data-copy],main b[data-copy],main strong[data-copy],main em[data-copy]{display:inline-block;max-width:100%;}
#exit-presentation{display:none;}
body.presenting #exit-presentation{display:block;position:fixed;z-index:80;top:18px;right:22px;padding:10px 18px;border:1px solid #ffffffd9;border-radius:100px;background:#effafae6;color:#285d6d;backdrop-filter:blur(16px);box-shadow:0 4px 18px #2a677722;font-size:14px;cursor:pointer;}
@media print{#exit-presentation{display:none!important}}
/* Hei font family only: retain every existing font-size and weight. */
:root{--font-body:"SimHei","Heiti SC","STHeiti","Noto Sans CJK SC","Microsoft YaHei","PingFang SC",sans-serif;--font-heading:var(--font-body);}
body.light-theme,body.light-theme *{font-family:var(--font-body)!important;}
#module-tools{display:flex;flex-wrap:wrap;align-items:center;gap:7px;border-top:1px solid #39768133;margin-top:8px;padding-top:8px;}
#module-tools[hidden]{display:none;}
#module-tools label{display:inline-flex;align-items:center;gap:4px;}
#module-tools input{width:64px;padding:4px;border:1px solid #39768144;background:white;border-radius:5px;}
#module-drag{touch-action:none;cursor:move;}
.alignment-tools{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap;}
#editbar [data-text-align][aria-pressed=true]{background:#397681;color:white;}
span[data-copy].text-aligned,b[data-copy].text-aligned,strong[data-copy].text-aligned{display:block;width:100%;}
.added-image-frame{margin:0;width:100%;height:100%;min-height:80px;}
.added-image-frame img{display:block;width:100%;height:100%;object-fit:contain;mix-blend-mode:normal!important;}
.added-image-module{margin-block:20px;}
body.light-theme #editbar{max-height:245px;}
body.light-theme.editing main{padding-top:235px;}
@media(max-width:760px){body.light-theme #editbar{max-height:35svh;}body.light-theme.editing main{padding-top:36svh;}#module-tools button{min-height:30px;}}
