/* Visual overrides only. Existing DOM, scripts, grids and responsive rules are retained. */
:root{
  --blue:#007E72;
  --orange:#C88D36;
  --bg:#F5F2E7;
  --card:#FFFCF5;
  --text:#063945;
  --muted:#77928D;
  --line:#E7DDC5;
  --chip:#E5F1E9;
  --shadow:0 10px 28px rgba(24,91,78,.12);
}
body{background:radial-gradient(ellipse at 84% 7%,#E1EEE0 0,transparent 55%),#F5F2E7}
.app-main{background:url("/ui/jade-landscape.png") center top / 100% 230px no-repeat}
.topbar{background:rgba(255,252,244,.65);border-bottom-color:rgba(164,201,185,.28);backdrop-filter:blur(8px)}
.app-sidebar{background:radial-gradient(ellipse at 18% 70%,rgba(0,94,99,.3),transparent 60%),linear-gradient(165deg,#002E3A,#003D48 65%,#004551);color:#FFFBEF;border-right-color:#CDAE69;box-shadow:inset -1px 0 0 rgba(233,201,131,.25);border-radius:0 16px 16px 0}
.history-wide .app-sidebar{border-right-color:#CDAE69}
.app-sidebar:before{height:max(0px,calc(100% - 270px));max-height:480px;bottom:65px;background:url("/ui/jade-sidebar.png") center bottom / 100% auto no-repeat;transform:none;mask-image:linear-gradient(to bottom,#000 calc(100% - 38px),transparent 100%)}
.app-sidebar:after{height:130px;background:linear-gradient(to bottom,rgba(0,48,58,.12),rgba(0,48,58,.72)),url("/ui/jade-sidebar-fade.png") center bottom / 100% auto no-repeat;mask-image:linear-gradient(to bottom,transparent 0%,#000 35%,#000 65%,transparent 100%)}
.brand{color:#FFFBEF}.brand small{color:#A8C6BF}
.brand-mark{flex-shrink:0;width:48px;height:48px}.brand-mark img{width:48px;height:48px;border-radius:0;box-shadow:none;background:transparent}
.brand strong{white-space:nowrap;overflow-wrap:normal}
.nav-btn{color:#EDF7EE;position:relative;isolation:isolate}
.nav-btn:hover{background:rgba(93,184,164,.13);color:#FFFBEF}
.nav-btn.active{color:#FFFDF2;background:radial-gradient(ellipse at 76% 90%,rgba(76,198,164,.38),transparent 50%),linear-gradient(110deg,#007F74,#006865 58%,#159C87);box-shadow:inset 0 0 0 1px rgba(191,213,143,.65),inset 0 1px 8px rgba(185,235,197,.3),0 6px 16px rgba(0,28,34,.2)}
.nav-btn.active:after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:url("/ui/jade-gold-corner.svg") top right / 27px 27px no-repeat;opacity:.85}
.nav-icon{color:#AADDD0}.nav-btn.active .nav-icon{color:#FFFBEF}
.sidebar-note{color:#E8E8CE;border-left-color:#D7B46D;text-shadow:0 1px 3px rgba(0,37,43,.8)}
.search{background:rgba(255,253,247,.92);border-color:#A6D1C6;box-shadow:inset 0 1px 2px rgba(25,94,78,.035)}
.search:focus-within{border-color:#198E7C;background:#FFFEF9;box-shadow:0 0 0 3px rgba(0,126,114,.1)}
.search-icon{stroke:#2F9B8D}.search input{color:#063945}.search input::placeholder{color:#7C9290}
.hero-card{background:rgba(255,253,245,.28);border-color:transparent;box-shadow:none;color:#063945}
.hero-card:before,.hero-card:after{content:none}
.hero-card h1{color:#003846;font-family:"Songti SC","SimSun",serif;font-weight:800;letter-spacing:.045em;text-shadow:0 1px 0 #FFFEF5}
.hero-stat{color:#356C66;background:rgba(255,253,245,.65);border-radius:10px;padding:5px 9px}
.history-yearbar,.history-subbar,.filters,.date-filter{background:rgba(255,251,240,.95);border-color:#E5D9BA;box-shadow:0 4px 12px rgba(30,92,70,.1),inset 0 1px 0 #FFFDF7}
.history-yearbar{position:relative;isolation:isolate}
.history-yearbar:before{content:"";position:absolute;right:0;bottom:0;width:330px;height:100%;z-index:-1;pointer-events:none;background:url("/ui/jade-landscape.png") right bottom / auto 105px no-repeat;mask-image:linear-gradient(to right,transparent,#000 75%);opacity:.65}
.year-chip,.tab,.chip,.sort-select,.date-filter select{background:#FFFCF5;border-color:#E9DFC9;color:#16474D}
.year-chip.active,.tab.active{background:linear-gradient(180deg,#159B87,#006F65);color:#FFFDF1;border-color:#67B9A3;box-shadow:inset 0 1px 4px rgba(216,245,222,.35),0 3px 8px rgba(11,115,88,.16)}
.chip.active{background:linear-gradient(180deg,#EDF8ED,#C9EBDD);color:#00695F;border-color:#8FBBA6}
.category-count{color:#6C968C}.filter-label,.date-filter label{color:#456F67}
.history-sections{counter-reset:resource-section}
.history-section{position:relative;isolation:isolate;counter-increment:resource-section;border-color:#80B49D;background:linear-gradient(180deg,#7CC4B3 0,#D9EADB 53px,#FFFCF5 54px);box-shadow:0 4px 12px rgba(38,96,74,.12),inset 0 0 0 1px rgba(220,187,113,.42)}
.history-section:before,.history-section:after{content:"";position:absolute;width:55px;height:55px;pointer-events:none;z-index:1;background:url("/ui/jade-gold-corner.svg") center / contain no-repeat}
.history-section:before{top:0;right:0}.history-section:after{bottom:0;left:0;transform:rotate(180deg)}
.history-section-titlebar{position:relative;isolation:isolate;min-height:40px}
.history-section-titlebar:after{content:"";position:absolute;right:0;top:0;width:380px;height:100%;z-index:-1;pointer-events:none;background:url("/ui/jade-landscape.png") right bottom / 380px auto no-repeat;mask-image:linear-gradient(to right,transparent,#000);opacity:.45}
.history-section-head{color:#003F45;position:relative;padding-left:53px;font-size:24px;min-height:40px;align-items:center;transform:translateY(-8px)}
.history-section-head:before{content:counter(resource-section,decimal-leading-zero);position:absolute;left:0;top:0;display:flex;align-items:center;justify-content:center;width:41px;height:41px;color:#FFF9E5;font:700 23px Georgia,serif;background:linear-gradient(145deg,#E8C67C,#B98034);border:2px solid #F6DEA0;box-shadow:0 0 0 1px #AD823D,0 2px 4px rgba(90,63,23,.2);border-radius:34% 42% 33% 44%;text-shadow:0 1px 1px rgba(105,63,20,.4)}
.history-section-count{color:#BA7825;font-size:16px}
.grid.today-modules{grid-template-columns:minmax(0,1fr);gap:18px}
.today-material-section{min-width:0;border:1px solid #80B49D;border-radius:18px;background:#FFFCF5;box-shadow:0 4px 12px rgba(38,96,74,.12);overflow:hidden}
.today-section-header{display:flex;align-items:center;gap:12px;min-height:54px;padding:10px 14px;background:linear-gradient(180deg,#7CC4B3,#D9EADB);color:#003F45}
.today-section-header h2{margin:0;font-size:22px;line-height:1.4}
.today-section-count{color:#BA7825;font-size:16px;white-space:nowrap}
.today-section-body{padding:14px}
.today-section-body>.empty{padding:32px 16px}
.history-view-all{color:#FFFDF1;border-color:#86C1A4;border-radius:999px;background:linear-gradient(180deg,#139684,#006B62);box-shadow:inset 0 1px 3px rgba(216,245,222,.4)}
.history-view-all:hover{background:linear-gradient(180deg,#1AAA94,#007A6D)}
.card{background:linear-gradient(145deg,#FFFDF7,#FFFDF7 65%,#F8F5E8);border-color:#E6DCC5;box-shadow:0 3px 8px rgba(62,93,66,.065)}
.card:hover{border-color:#87BDA5;box-shadow:0 10px 22px rgba(24,105,81,.14)}
.cover{background:linear-gradient(135deg,#DBEADF,#F4EFDD)}
.cover-placeholder{background:linear-gradient(135deg,#005857,#1F9D88);color:#FFF9E9}.cover-placeholder:after{background:#D7AD58}
.asset-badge{background:rgba(4,58,68,.88);color:#FFFDF2}
.tag{background:#DDF1E6;color:#00786D}.tag.sub{background:#EDF0E5;color:#5B7D74}.tag.pick{background:#F8ECD1;color:#A17728}
.card h3{color:#063B46}.excerpt{color:#7A9188}.card-footer{color:#7B9B92}.card-footer span:last-child{color:#008476;font-weight:650}
.empty{background:#FFFCF5;border-color:#D6CAA9;color:#759489}
.sort-select{color:#245D56}.result-info{color:#6F9488}
.history-scrollbar{background:rgba(248,245,234,.97);border-color:#D6CBA7;box-shadow:0 -4px 14px rgba(53,92,67,.08)}
.history-scrollbar button{background:#FFFCF4;color:#007C6F;border-color:#DACEAC}
.history-scrollbar input{accent-color:#007E72}
.modal-backdrop,.history-category-backdrop{background:rgba(0,36,43,.6)}
.modal,.history-category-dialog{background:#FFFCF4;border-color:#C8B784;box-shadow:0 20px 60px rgba(0,42,40,.25)}
.modal-head,.history-category-header{background:linear-gradient(120deg,#F8F3E4,#E0EEDC);border-color:#D9CCAB}
.modal-head h2,.history-category-header h2{color:#063945}.history-category-total{color:#6B8F81}
.close-btn{background:#E8EEDF;color:#306D60}.copy-box{background:#F7F5E9;border-color:#DED4B8;color:#184A48}
.copy-btn,.link-btn{background:linear-gradient(180deg,#139684,#006B62);color:#FFFDF1;box-shadow:0 3px 8px rgba(9,115,85,.15)}
.copy-image-btn{background:#EAF4E8;border-color:#BBD2B6;color:#007569}.copy-image-btn:hover{background:#D5EBD7}
.asset-item{background:#FFFCF5;border-color:#E4D7B8}.asset-item img{background:#EBF0E3}.asset-name{color:#608074}
.file-icon{background:#F7ECD1;color:#A27927}.file-meta{color:#759087}.loading{background:#005B57;color:#FFFDF1}
@media(min-width:761px){.hero-card h1{font-size:42px}}
@media(min-width:1081px){#materialGrid:not(.today-modules),#materialGrid .today-section-body>.grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
