/* Presentation only. Every selector is opt-in for the fourteen Macaron themes.
   Classic palettes, business scripts, IDs, animation and preferences stay intact. */
html[data-macaron=true][data-theme=sakura]{--m-action:#84596f;--m-deep:#604354}
html[data-macaron=true][data-theme=taro]{--m-action:#71608f;--m-deep:#504662}
html[data-macaron=true][data-theme=glacier]{--m-action:#417687;--m-deep:#315664}
html[data-macaron=true][data-theme=lemon]{--m-action:#7a6a31;--m-deep:#574d2c}
html[data-macaron=true][data-theme=mint]{--m-action:#3e7866;--m-deep:#31584c}
html[data-macaron=true][data-theme=sky]{--m-action:#467593;--m-deep:#34546b}
html[data-macaron=true][data-theme=apricot]{--m-action:#8a623c;--m-deep:#624831}
html[data-macaron=true][data-theme=grapefruit]{--m-action:#935c6e;--m-deep:#654350}
html[data-macaron=true][data-theme=clove]{--m-action:#80608d;--m-deep:#594661}
html[data-macaron=true][data-theme=matcha]{--m-action:#60764c;--m-deep:#465738}
html[data-macaron=true][data-theme=aurora]{--m-action:#76628e;--m-deep:#514460}
html[data-macaron=true][data-theme=sea]{--m-action:#3c7577;--m-deep:#2f565a}
html[data-macaron=true][data-theme=berry]{--m-action:#835f86;--m-deep:#5a435f}
html[data-macaron=true][data-theme=glass]{--m-action:#53748f;--m-deep:#3c536b}
html[data-macaron=true][data-theme]{
 --green:var(--m-action);--deep:var(--m-deep);
 --ink:#354052;--muted:#5d6879;
 --paper:color-mix(in srgb,var(--c) 5%,#f3f5f8);
 --surface:#fff;--soft:color-mix(in srgb,var(--c) 17%,#fff);
 --tint:color-mix(in srgb,var(--c) 35%,#fff);
 --tile:color-mix(in srgb,var(--c) 9%,#fff);
 --line:color-mix(in srgb,var(--c) 18%,#d9dfe6);
 --m-title:#29313e;--m-nav:color-mix(in srgb,var(--m-deep) 38%,#293442);
 --nova-action:var(--m-action);
 --nova-grad:linear-gradient(135deg,var(--m-action),var(--m-deep));
 --nova-gold:var(--m-action);
 --nova-card-shadow:0 1px 3px #25304405,0 4px 16px -10px #25304420;
 --nova-glow:0 5px 15px -8px #25304430;
}
html[data-macaron=true] body.farm-ui{
 --muted:#5d6879;background:var(--paper);color:var(--ink);
 font-family:"PingFang SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;
 -webkit-font-smoothing:antialiased;
}
html[data-macaron=true] body.farm-ui :is(button,input,select,textarea){font-family:inherit}
html[data-macaron=true] body.farm-ui :is(h1,h2,h3,h4){color:var(--m-title);font-weight:650;letter-spacing:0}
html[data-macaron=true] body.farm-ui :is(.muted,.tiny,.data-note,.hidden-selection-hint,.profile-label,.inventory-selection,.inventory-page-size,footer){color:var(--muted)}
html[data-macaron=true] body.farm-ui :is(input,select,textarea){background:#fff;color:var(--ink);border-color:#9aa5b3}
html[data-macaron=true] body.farm-ui :is(input,textarea)::placeholder{color:#697587;opacity:1}
html[data-macaron=true] body.farm-ui :is(input,select,textarea):focus{border-color:var(--m-action);box-shadow:0 0 0 3px var(--soft)}
html[data-macaron=true] body.farm-ui :focus-visible{outline:2px solid var(--m-action);outline-offset:3px}

/* Quiet white chrome; colored surfaces sit below the controls, not behind text. */
html[data-macaron=true] .app-topbar{background:#fff;border-bottom:1px solid var(--line)}
html[data-macaron=true] .app-breadcrumb{color:var(--muted)}
html[data-macaron=true] .app-breadcrumb strong{color:var(--m-title)}
html[data-macaron=true] .profile-box{background:#fff;border-color:var(--line)}
html[data-macaron=true] .profile-avatar{background:var(--soft)!important;color:var(--m-deep)!important}
html[data-macaron=true] .theme-trigger{background:#fff;color:var(--ink);border-color:var(--line)}
html[data-macaron=true] .theme-dot{background:var(--c);box-shadow:none;border:1px solid var(--m-action)}
html[data-macaron=true] body.farm-ui[data-density] .main>header{
 background:linear-gradient(110deg,color-mix(in srgb,var(--c1) 34%,#f9fafc),color-mix(in srgb,var(--c2) 20%,#fff) 65%,color-mix(in srgb,var(--c3) 26%,#fff));
 color:var(--ink);border:1px solid color-mix(in srgb,var(--c1) 38%,#dce1e8);box-shadow:none;
}
html[data-macaron=true] body.farm-ui[data-density] .main>header::before{background:none}
html[data-macaron=true] body.farm-ui[data-density] .main>header::after{opacity:.07}
html[data-macaron=true] body.farm-ui[data-density] .main>header h1{color:var(--m-title);font-weight:700;text-shadow:none}
html[data-macaron=true] body.farm-ui[data-density] .main>header :is(p,.muted){color:#536075}
html[data-macaron=true] body.farm-ui[data-density] .main>header .eyebrow{color:var(--m-action)}
html[data-macaron=true] body.farm-ui[data-density] .main>header .badge{color:var(--m-deep);background:#ffffffc9;border-color:var(--line)}
html[data-macaron=true] body.farm-ui[data-density] .main>header .header-right #addTags{background:#fff;color:var(--ink);border-color:var(--line)}
html[data-macaron=true] body.farm-ui[data-density] .main>header .header-right #refreshCurrent{background:var(--m-action);color:#fff;box-shadow:0 2px 4px #25304412}
html[data-macaron=true] body.farm-ui[data-density] .main>header .header-right #refreshCurrent:hover{background:var(--m-deep);filter:none}
html[data-macaron=true] body.farm-ui[data-density] .main>header .header-right #refreshCurrent:disabled{background:var(--soft);color:var(--muted);border:1px dashed #9aa5b3;box-shadow:none;filter:none}

/* Navigation is deliberately darker than the content, with readable neutral labels. */
html[data-macaron=true] body.farm-ui[data-density] .sidebar{background:linear-gradient(180deg,var(--m-nav),color-mix(in srgb,var(--m-nav) 90%,#18212f));border-color:#ffffff1a;box-shadow:none}
html[data-macaron=true] body.farm-ui[data-density] .sidebar .brand{color:#fff}
html[data-macaron=true] body.farm-ui .sidebar :is(.brand small,.nav-caption,.sidebar-bottom){color:#c7d1de}
html[data-macaron=true] body.farm-ui[data-density] .sidebar .mark{background:var(--c1);color:var(--m-deep);box-shadow:none}
html[data-macaron=true] body.farm-ui[data-density] .sidebar .nav{color:#e0e6ee;font-weight:500}
html[data-macaron=true] body.farm-ui[data-density] .sidebar .nav:hover{background:#ffffff0f;color:#fff}
html[data-macaron=true] body.farm-ui[data-density] .sidebar .nav.active{background:#ffffff16;color:#fff;box-shadow:inset 3px 0 var(--c1);font-weight:650}
html[data-macaron=true] body.farm-ui[data-density] .sidebar .nav.active .ui-icon{color:var(--c1);filter:none}
html[data-macaron=true] body.farm-ui .sidebar-garden{background:#ffffff09;border:1px solid #ffffff12}
html[data-macaron=true] body.farm-ui .sidebar-garden :is(strong,.ui-icon){color:#e2e8f0}
html[data-macaron=true] body.farm-ui .sidebar-garden p{color:#c7d1de}
html[data-macaron=true] body.farm-ui .sidebar-bottom .pulse{background:#b5d7c7;box-shadow:0 0 0 3px #b5d7c718}
html[data-macaron=true] body.farm-ui .sidebar :focus-visible{outline-color:#e8ecf0}

/* Primary numbers, labels and supporting notes have separate visual roles. */
html[data-macaron=true] body.farm-ui[data-density] :is(.panel,.stats article,.group-card){background:#fff;border:1px solid var(--line);box-shadow:var(--nova-card-shadow)}
html[data-macaron=true] body.farm-ui[data-density] .stats article::before{background:var(--cc,var(--c1));height:3px}
html[data-macaron=true] body.farm-ui[data-density] .stats strong{color:var(--m-title);background:none;-webkit-text-fill-color:var(--m-title);font-weight:650;font-variant-numeric:tabular-nums}
html[data-macaron=true] body.farm-ui[data-density] #statistics article>span{color:#465267;font-weight:500;font-size:12px}
html[data-macaron=true] body.farm-ui[data-density] #statistics article>.tiny{color:var(--muted);font-size:10.5px}
html[data-macaron=true] body.farm-ui .stat-icon{background:color-mix(in srgb,var(--cc,var(--c1)) 28%,#fff)!important;color:var(--m-deep)!important;box-shadow:none}
html[data-macaron=true] body.farm-ui .stat-icon .ui-icon{color:var(--m-deep);stroke:var(--m-deep)}
html[data-macaron=true] body.farm-ui .primary,html[data-macaron=true] body.farm-ui[data-density] #toggleFilters{background:var(--m-action);color:#fff;box-shadow:none}
html[data-macaron=true] body.farm-ui .primary:not(:disabled):hover{background:var(--m-deep);box-shadow:none}
html[data-macaron=true] body.farm-ui .secondary{background:#fff;color:#465267;border-color:#b2bbc7;box-shadow:none}
html[data-macaron=true] body.farm-ui .secondary:not(:disabled):hover{background:var(--soft);border-color:var(--m-action);box-shadow:none}
html[data-macaron=true] body.farm-ui .text-button{color:var(--m-action)}
html[data-macaron=true] body.farm-ui .text-button.danger{color:#a33e40}
html[data-macaron=true] body.farm-ui .badge{background:var(--soft);color:var(--m-deep)}
html[data-macaron=true] body.farm-ui[data-density] #notice:not([hidden]){background:var(--soft);color:var(--ink);border-color:var(--line);box-shadow:inset 3px 0 var(--m-action);font-weight:500}
html[data-macaron=true] body.farm-ui .inventory-selection{background:var(--tile);border-color:var(--line)}
html[data-macaron=true] body.farm-ui .scope-storage-card{background:var(--soft);color:var(--ink);border-color:var(--line)}
html[data-macaron=true] body.farm-ui .scope-storage-label{color:var(--muted)}
html[data-macaron=true] body.farm-ui .scope-storage-ratio{color:var(--m-deep)}

/* Retain the pastel seeds and the four-color combination rhythm. */
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card{
 background:linear-gradient(165deg,color-mix(in srgb,var(--cc,var(--c1)) 25%,#fff) 0%,color-mix(in srgb,var(--cc,var(--c1)) 9%,#fff) 70%,#fff);
 border:1px solid color-mix(in srgb,var(--cc,var(--c1)) 52%,#cdd5df);
 box-shadow:inset 0 1px #fff,0 1px 2px #25304406;
}
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card:hover{border-color:color-mix(in srgb,var(--cc,var(--c1)) 30%,var(--m-action));box-shadow:var(--nova-glow)}
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card::before{background:radial-gradient(160px circle at var(--mx,50%) var(--my,50%),#ffffffc4,transparent 65%)}
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card .item-name{color:var(--ink);font-size:12px;font-weight:500;line-height:1.35}
html[data-macaron=true] body.farm-ui[data-density] .aggregate-quantity{color:var(--m-deep);font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:0}
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card .compact-stock-status{color:var(--muted);background:#ffffff80;border-color:var(--line);font-size:10px}
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card .compact-stock-status[data-kind=attention]{color:#875021;background:#fff4df}
html[data-macaron=true] body.farm-ui .favorite-button{color:#6c7788;text-shadow:none}
html[data-macaron=true] body.farm-ui .favorite-button.favorite{color:#936b26;text-shadow:none}
html[data-macaron=true] body.farm-ui .aggregate-card input{accent-color:var(--m-action)}
html[data-macaron=true] body.farm-ui[data-density] #workspace .aggregate-card:has([data-select-item]:checked){outline:2px solid var(--m-action);outline-offset:-1px}
html[data-macaron=true] body.farm-ui .zero-items-section{border-color:var(--line)}
html[data-macaron=true] body.farm-ui .zero-items-section .aggregate-quantity{color:#626d7c}
html[data-macaron=true] body.farm-ui[data-density] .data-note{font-size:10px;line-height:1.5}

/* Apply the same type roles in catalog, forms, admin tables and overlays. */
html[data-macaron=true] body.farm-ui dialog{color:var(--ink);background:#fff;border-color:var(--line);box-shadow:0 18px 55px #1f2a3b30;overscroll-behavior:contain}
html[data-macaron=true] body.farm-ui dialog::backdrop{background:#202c3d80}
html[data-macaron=true] body.farm-ui :is(.inventory-table th,thead th){background:var(--tile);color:#526075;font-weight:600}
html[data-macaron=true] body.farm-ui :is(.inventory-table td,tbody td){color:var(--ink);border-color:var(--line)}
html[data-macaron=true] body.farm-ui .table-wrap tbody tr:hover{background:var(--tile)}
html[data-macaron=true] body.farm-ui :is(.security-summary article,.account-summary article,.security-note){background:var(--tile);border-color:var(--line)}
html[data-macaron=true] body.farm-ui .account-summary strong{color:var(--m-title);font-weight:650}
html[data-macaron=true] body.farm-ui .invitation-panel{background:#f8f8f4;border-color:#dce1da}
html[data-macaron=true] body.farm-ui .account-presence.online{background:#edf5ef;color:#356448}
html[data-macaron=true] body.farm-ui .account-presence:is(.offline,.never){background:#f0f2f6;color:var(--muted)}
html[data-macaron=true] body.farm-ui .security-status{background:#edf5ef;color:#356448}
html[data-macaron=true] body.farm-ui .security-status.locked{background:#fbefed;color:#9b403b}
html[data-macaron=true] body.farm-ui .catalog-open{background:#fff;color:var(--ink);border-color:var(--line)}
html[data-macaron=true] body.farm-ui .catalog-open:hover{background:var(--soft);border-color:var(--m-action)}
html[data-macaron=true] body.farm-ui #themeDialog .theme-group-title{color:var(--m-title)}
html[data-macaron=true] body.farm-ui #themeDialog .theme-option{background:#fff;color:var(--ink)}
html[data-macaron=true] body.farm-ui #themeDialog .theme-option[aria-pressed=true]{background:var(--soft);color:var(--m-deep);border-color:var(--m-action)}
html[data-macaron=true] body.farm-ui #themeDialog .theme-option[aria-pressed=true]::before{background:var(--m-action);color:#fff}
html[data-macaron=true] body.farm-ui .login-card{background:#fff;border:1px solid var(--line);box-shadow:0 18px 50px -24px #25304445}
html[data-macaron=true] body.farm-ui .auth-shell::before{
 background:radial-gradient(ellipse at 14% 20%,color-mix(in srgb,var(--c1) 25%,#f7f8fb),transparent 65%),radial-gradient(ellipse at 92% 12%,color-mix(in srgb,var(--c2) 22%,#f7f8fb),transparent 65%),radial-gradient(ellipse at 70% 100%,color-mix(in srgb,var(--c3) 25%,#f7f8fb),transparent 65%),var(--paper);
}
html[data-macaron=true] body.farm-ui .login-card h1{color:var(--m-title);font-weight:650}
html[data-macaron=true] body.farm-ui .auth-story h2{color:var(--m-title);font-weight:650}
html[data-macaron=true] body.farm-ui .auth-story h2 em{color:var(--m-action)}
html[data-macaron=true] body.farm-ui .auth-story>p{color:var(--muted)}
@media(min-width:701px) and (max-width:1100px){
 html[data-macaron=true] body.farm-ui[data-density] #statistics article{grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:8px;row-gap:4px}
 html[data-macaron=true] body.farm-ui #statistics .stat-icon{width:28px!important;height:28px!important;border-radius:8px!important}
 html[data-macaron=true] body.farm-ui #statistics .stat-icon .ui-icon{width:16px;height:16px}
 html[data-macaron=true] body.farm-ui[data-density] #statistics article>.stat-icon{grid-column:1;grid-row:1}
 html[data-macaron=true] body.farm-ui[data-density] #statistics article>strong{grid-column:2;grid-row:1;font-size:22px}
 html[data-macaron=true] body.farm-ui[data-density] #statistics article>span{grid-column:1/-1;grid-row:2}
 html[data-macaron=true] body.farm-ui[data-density] #statistics article>.tiny{grid-column:1/-1;grid-row:3}
}
@media(max-width:700px){
 html[data-macaron=true] body.farm-ui[data-density] .sidebar .nav.active{box-shadow:inset 0 -2px var(--c1)}
 html[data-macaron=true] body.farm-ui[data-density] #statistics article>span{font-size:11px}
 html[data-macaron=true] body.farm-ui[data-density] #statistics article>.tiny{font-size:10px}
 html[data-macaron=true] body.farm-ui[data-density] #itemFarmTable .item-holder-quantity{color:var(--m-deep)}
}
