/* Casual comfort: warm lamp-lit evening theme, 1-tap bench exit, 7s idle hint, 3-sample mini-set pause. */

/* --- Desk wallet pill + workbench booster bar + Atelier Shop --- */
.desk-wallet-btn {
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid #b89865;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff5dc 0%, #f0dcad 100%);
  color: #543712;
  font: 700 13px/1 Georgia, serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
body[data-theme=evening] .desk-wallet-btn {
  background: linear-gradient(180deg, #4b3822 0%, #382919 100%) !important;
  color: #f6dc9c !important;
  border-color: #9e7e49 !important;
}

.mb-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto !important;
}
.mb-wallet {
  min-height: 44px;
  padding: 4px 7px;
  border: 1px solid #b89865;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff5dc 0%, #f0dcad 100%);
  color: #543712;
  font: 700 12px/1 Georgia, serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}
body[data-theme=evening] .mb-wallet {
  background: linear-gradient(180deg, #4b3822 0%, #382919 100%) !important;
  color: #f6dc9c !important;
  border-color: #9e7e49 !important;
}

#bench .mineral-bench[data-boosters=on] {
  grid-template-areas: 'head' 'order' 'tray' 'boosters' 'summary' 'actions';
  grid-template-rows: auto auto minmax(0, max-content) auto auto auto;
}
@media (orientation: landscape) and (max-height: 450px) and (min-width: 500px) {
  #bench .mineral-bench[data-boosters=on] {
    grid-template-areas: 'head order' 'tray tray' 'boosters boosters' 'summary actions';
    grid-template-rows: auto minmax(0, max-content) auto auto;
  }
}
.mb-boosters {
  grid-area: boosters;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 0 2px;
}
.mb-booster {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 44px;
  min-width: 0;
  padding: 3px 2px;
  border: 1px solid #bca687;
  border-radius: 7px;
  background: linear-gradient(180deg, #fbf4e6 0%, #efe2cb 100%);
  color: #3a2e25;
  cursor: pointer;
  line-height: 1;
}
.mb-booster[aria-pressed=true] {
  border-color: #205b48;
  background: linear-gradient(180deg, #e7f4ee 0%, #cde7db 100%);
  box-shadow: 0 0 0 2px rgba(32, 91, 72, .35);
}
.mb-booster:disabled { opacity: .48; cursor: default; }
.mb-b-sym { font: 700 13px/1 Georgia, serif; color: #5b3b16; }
.mb-b-name { font: 600 9.5px/1.05 system-ui, -apple-system, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mb-b-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 999px;
  font: 700 9.5px/1.15 system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
}
.mb-b-badge[data-mode=stock] { background: #205b48; color: #faf4e6; }
.mb-b-badge[data-mode=buy] { background: #d59d36; color: #2b1a07; }
body[data-theme=evening] .mb-booster {
  background: linear-gradient(180deg, #3c3128 0%, #2d241d 100%) !important;
  border-color: #6b5740 !important;
  color: #efe4d2 !important;
}
body[data-theme=evening] .mb-booster[aria-pressed=true] {
  background: linear-gradient(180deg, #274f41 0%, #1d3d32 100%) !important;
  border-color: #82d4af !important;
  box-shadow: 0 0 0 2px rgba(130, 212, 175, .42) !important;
}
body[data-theme=evening] .mb-b-sym { color: #f1ce82; }
body[data-theme=evening] .mb-b-badge[data-mode=stock] { background: #2c6d56; color: #f6f0e4; }
body[data-theme=evening] .mb-b-badge[data-mode=buy] { background: #c99235; color: #231405; }
.mb-tray[data-booster] {
  box-shadow: 0 0 0 2px #d59d36, 0 0 12px rgba(213, 157, 54, .35);
}
.mb-tray[data-booster] .mb-cell { cursor: crosshair; }
#benchShopBtn { grid-column: 1 / -1; min-height: 44px; }

.mb-reward {
  grid-column: 1 / -1;
  margin: .08rem 0 .06rem;
  padding: .24rem .48rem;
  border-radius: 6px;
  border: 1px solid #c9a76a;
  background: linear-gradient(180deg, #fff6df 0%, #f4e2b8 100%);
  color: #56370f;
  font: 600 11.5px/1.25 Georgia, serif;
}
body[data-theme=evening] .mb-reward {
  background: linear-gradient(180deg, #433320 0%, #342718 100%) !important;
  border-color: #9e7e49 !important;
  color: #f6dc9c !important;
}
#bench .mineral-bench #mineralEnd:has(#benchContinueExtra:not([hidden])),
#bench .mineral-bench #mineralEnd:has(#miniSetPause:not([hidden])) {
  padding: .35rem .5rem;
  gap: .18rem .4rem;
}
#bench .mineral-bench #mineralEnd:has(#benchContinueExtra:not([hidden])) #resultMount {
  width: min(100%, 3.8rem);
}
#bench .mineral-bench #mineralEnd:has(#miniSetPause:not([hidden])) #resultMount {
  width: min(100%, 3.4rem);
  height: 36px;
}
#bench .mineral-bench #mineralEnd:has(#miniSetPause:not([hidden])) .mb-reward {
  padding: 2px 6px;
  font-size: .72rem;
  line-height: 1.15;
}
#bench .mineral-bench #mineralEnd:has(#miniSetPause:not([hidden])) .mini-pause {
  padding: .24rem .45rem;
  gap: .12rem;
}
#bench .mineral-bench #mineralEnd:has(#miniSetPause:not([hidden])) .mini-pause p {
  font-size: .71rem;
  line-height: 1.14;
}
#bench .mineral-bench #mineralEnd:has(#benchContinueExtra:not([hidden])) #benchResultNote {
  font-size: .72rem;
  line-height: 1.14;
}
.mb-continue-extra {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid #b5842a !important;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7cf6a 0%, #dda53c 100%) !important;
  color: #2f1b05 !important;
  font: 700 13px/1.15 Georgia, serif;
  cursor: pointer;
}
body[data-theme=evening] .mb-continue-extra {
  background: linear-gradient(180deg, #d7a343 0%, #b37e26 100%) !important;
  color: #231304 !important;
  border-color: #f2cf84 !important;
}

dialog.atelier-shop {
  width: min(94vw, 440px);
  max-height: 90dvh;
  overflow: auto;
  margin: auto;
  padding: 14px;
  border: 1px solid #bba483;
  border-top: 3px solid #9d7738;
  border-radius: 12px;
  background: #f6eedf;
  color: #362c24;
  box-shadow: 0 18px 46px rgba(24, 18, 12, .45);
}
dialog.atelier-shop::backdrop { background: rgba(20, 15, 11, .68); }
.shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d5c4a7;
}
.shop-head small { display: block; font: 700 10px/1.2 system-ui, sans-serif; letter-spacing: .08em; color: #7b6040; }
.shop-head h2 { margin: 2px 0 0; font: 600 20px/1.15 Georgia, serif; color: #24423a; }
.shop-balance {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #b89865;
  background: #fff5dc;
  color: #543712;
  font: 700 14px/1 Georgia, serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shop-status {
  margin: 8px 0 10px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #ede2ce;
  border: 1px solid #d2c0a1;
  font-size: 13px;
  line-height: 1.3;
}
.shop-section { margin: 0 0 12px; }
.shop-section h3 { margin: 0 0 6px; font: 600 15px/1.2 Georgia, serif; color: #3a2e25; }
.shop-demo-note { margin: 0 0 8px; font: italic 12px/1.3 Georgia, serif; color: #6e5a44; }
.shop-tools, .shop-packs { display: grid; gap: 7px; }
.shop-tool, .shop-pack {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d2c0a1;
  background: #fbf6ec;
}
.st-top { display: flex; align-items: center; gap: 8px; }
.st-sym {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: #efe2cb;
  border: 1px solid #c9b28d;
  font: 700 14px/1 Georgia, serif;
  color: #5b3b16;
  flex-shrink: 0;
}
.st-top strong, .shop-pack strong { display: block; font: 600 14px/1.15 Georgia, serif; }
.st-top small, .shop-pack small { display: block; font-size: 12px; color: #695746; }
.shop-tool p { margin: 0; font-size: 12px; line-height: 1.28; color: #544537; }
.shop-tool button, .shop-pack button, .shop-restore, .shop-close {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid #b59d7a;
  background: #efe3ce;
  color: #342921;
  font: 600 13px/1.15 Georgia, serif;
  cursor: pointer;
}
.shop-pack button {
  background: linear-gradient(180deg, #f7cf6a 0%, #dda53c 100%);
  border-color: #b5842a;
  color: #2f1b05;
}
.shop-tool button:disabled { opacity: .45; cursor: default; }
.shop-restore { width: 100%; margin-top: 8px; }
.shop-close { width: 100%; background: #205b48; border-color: #174636; color: #faf4e6; }
body[data-theme=evening] dialog.atelier-shop {
  background: #2b221c !important;
  color: #f1e6d5 !important;
  border-color: #6b5740 !important;
}
body[data-theme=evening] .shop-head { border-bottom-color: #544434; }
body[data-theme=evening] .shop-head small { color: #d6bc8e; }
body[data-theme=evening] .shop-head h2, body[data-theme=evening] .shop-section h3 { color: #f7eedf !important; }
body[data-theme=evening] .shop-balance { background: #463521; color: #f6dc9c; border-color: #9e7e49; }
body[data-theme=evening] .shop-status { background: #362b23; border-color: #5c4b39; color: #f0e4d2; }
body[data-theme=evening] .shop-demo-note, body[data-theme=evening] .st-top small, body[data-theme=evening] .shop-pack small, body[data-theme=evening] .shop-tool p { color: #cbbca5 !important; }
body[data-theme=evening] .shop-tool, body[data-theme=evening] .shop-pack { background: #352a22; border-color: #5c4b39; }
body[data-theme=evening] .st-sym { background: #493824; border-color: #8f7245; color: #f5d896; }
body[data-theme=evening] .shop-pack button { background: linear-gradient(180deg, #d7a343 0%, #b37e26 100%) !important; color: #231304 !important; border-color: #f2cf84 !important; }
body[data-theme=evening] .shop-restore { background: #33271f !important; color: #f3e8d6 !important; border-color: #7c6649 !important; }
body[data-theme=evening] .shop-close { background: #2b6e57 !important; color: #f6f0e4 !important; border-color: #529c81 !important; }

/* --- Desk 1-tap evening + sound + wallet controls --- */
#dayDesk > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .4rem;
  row-gap: .2rem;
  padding-right: 0 !important;
}
#dayDesk > header::before { display: none; }
#dayDesk > header .eyebrow { grid-column: 1; grid-row: 1; }
#dayDesk > header h1 { grid-column: 1; grid-row: 2; }
#dayDesk > header .desk-head-controls {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
@media (max-width: 365px) {
  #dayDesk > header .desk-head-controls {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-start;
    margin-top: 2px;
  }
}
#deskSoundToggle {
  min-width: 44px;
  min-height: 44px;
  padding: .3rem .45rem;
  border-radius: 999px;
  border: 1px solid #b59f7a;
  background: #fbf3e2;
  color: #3a2f26;
  font: 600 .95rem/1 system-ui, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px #3b2d1b1f;
}
#deskSoundToggle[aria-pressed=true] {
  border-color: #205b48;
  background: #e7f4ee;
  color: #174636;
}
#deskThemeToggle {
  min-height: 44px;
  padding: .3rem .6rem;
  border-radius: 999px;
  border: 1px solid #b59f7a;
  background: #fbf3e2;
  color: #3a2f26;
  font: 600 .78rem/1 system-ui, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px #3b2d1b1f;
}
body[data-theme=evening] #deskSoundToggle {
  background: #3a2e25 !important;
  color: #f3e8d6 !important;
  border-color: #6b5740 !important;
}
body[data-theme=evening] #deskSoundToggle[aria-pressed=true] {
  background: #244b3d !important;
  color: #c8f2de !important;
  border-color: #67b996 !important;
}

/* --- 1-tap ← Стол exit & 3-pearl mini-set bar in bench header --- */
#bench .mineral-bench .mb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  padding-right: 0;
}
#bench .mineral-bench .mb-head::after { display: none; }
#bench .mineral-bench .mb-head > div:first-child { min-width: 0; flex: 1 1 auto; }
#bench .mineral-bench .mb-head-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .28rem .45rem;
}
#benchBack.mb-back {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 72px;
  padding: 0 .6rem;
  border-radius: 6px;
  border: 1px solid #b7a17d;
  background: #fbf4e5;
  color: #2f4b41;
  font: 600 .82rem/1 system-ui, sans-serif;
  white-space: nowrap;
}
#miniSetBar.mb-miniset {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #c3ae8a;
  background: #f8efdc;
  color: #5b4932;
  font: 600 10.5px/1.2 system-ui, sans-serif;
  letter-spacing: .02em;
  vertical-align: middle;
}
#miniSetBar .ms-pearl {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid #9e845c;
  background: transparent;
}
#miniSetBar .ms-pearl.is-done {
  background: radial-gradient(circle at 35% 30%, #fff8e2, #d0a862 68%, #987336);
  border-color: #8f6b32;
}

/* --- Gentle 7s anti-stall idle hint --- */
@keyframes linaIdlePulse {
  0%, 100% {
    box-shadow: inset 0 0 0 3px rgba(246, 211, 128, .92), 0 0 0 1px rgba(214, 165, 76, .75);
  }
  50% {
    box-shadow: inset 0 0 0 4px rgba(255, 236, 179, 1), 0 0 8px 1px rgba(235, 189, 98, .7);
  }
}
.mb-grid .mb-cell[data-idle-hint=yes] {
  outline: 2px solid #c99944;
  outline-offset: -2px;
  border-radius: 6px;
  animation: linaIdlePulse 1.8s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .mb-grid .mb-cell[data-idle-hint=yes] {
    animation: none;
    box-shadow: inset 0 0 0 3px #f6d98c;
  }
}
.mb-status[data-idle-tip=yes] {
  color: #6a4318;
  font-weight: 500;
}

/* --- Calm loss tip & 3/3 cozy mini-set pause banner --- */
#benchLossTip.mb-loss-tip {
  grid-column: 1 / -1;
  margin: .1rem 0 .25rem;
  font: italic .84rem/1.3 Georgia, serif;
  color: #5b4a3a;
}
#miniSetPause.mb-pause-card {
  grid-column: 1 / -1;
  margin: .08rem 0 .16rem;
  padding: .34rem .5rem;
  border-radius: 8px;
  border: 1px solid #c5a672;
  background: linear-gradient(160deg, #fff9ec, #f3e6cc);
  color: #3a2d22;
  text-align: center;
}
#miniSetPause .mp-eyebrow {
  display: inline-block;
  font: 700 9.5px/1.2 system-ui, sans-serif;
  letter-spacing: .1em;
  color: #7d5b2d;
  text-transform: uppercase;
}
#miniSetPause .mp-title {
  display: block;
  margin: .08rem 0 .1rem;
  font: 600 .9rem/1.15 Georgia, serif;
  color: #2e241b;
}
#miniSetPause .mp-gems {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .38rem;
  margin: .14rem 0;
}
#miniSetPause .mp-gems img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
#miniSetPause .mp-note {
  margin: 0;
  font: italic .76rem/1.2 Georgia, serif;
  color: #5b4a3a;
}
#bench #mineralEnd:has(#miniSetPause:not([hidden])) {
  grid-row: 3 / 6;
  align-self: center;
  z-index: 4;
  padding: .65rem .7rem;
  gap: .32rem .45rem;
}
#bench #mineralEnd:has(#miniSetPause:not([hidden])) #resultMount {
  height: 52px;
  width: auto;
  max-width: 120px;
}
#bench #mineralEnd:has(#miniSetPause:not([hidden])) #benchResultNote {
  font-size: .78rem;
  margin: 0;
}

/* =====================================================================
   WARM LAMP-LIT EVENING PALETTE («Вечер у лампы»)
   No dark/dimming CSS filter is ever placed on portraits or crystals.
   ===================================================================== */
:root[data-theme=evening],
body[data-theme=evening] {
  color-scheme: dark;
  --ink: #f3e8d6;
  --quiet: #c7b8a1;
  --chapter: #9ad1b9;
  --ribbon: #cfa86b;
  --rule: #5f4f3d;
  --leaf: #2e251f;
  --wash: #251e19;
  --paper: linear-gradient(135deg, #322821, #271f1a);
  --print-shadow: 0 2px 6px rgba(0, 0, 0, .42), 0 0 0 1px rgba(212, 179, 122, .16);
}
body[data-theme=evening] {
  background: radial-gradient(circle at 50% 0%, rgba(168, 122, 64, .18), transparent 58%), #1a1411 !important;
  color: #f3e8d6;
}
body[data-theme=evening] main {
  background: linear-gradient(165deg, #27201b 0%, #201a16 100%) !important;
  border-color: #4b3d30 !important;
  box-shadow: 0 0 0 1px #4b3d30, 0 8px 24px rgba(0, 0, 0, .55) !important;
  color: #f3e8d6;
}
body[data-theme=evening] #dayDesk {
  background: transparent !important;
  color: #f3e8d6;
}
body[data-theme=evening] #dayDesk > header,
body[data-theme=evening] .folio-head,
body[data-theme=evening] #album .folio-head {
  border-block-end-color: #6f5b42;
  color: #f3e8d6;
}
body[data-theme=evening] #dayDesk h1,
body[data-theme=evening] #dayDesk h2,
body[data-theme=evening] .folio-head h1,
body[data-theme=evening] #album .folio-head h1,
body[data-theme=evening] #deskShelf h1,
body[data-theme=evening] #bench h2,
body[data-theme=evening] #room h2,
body[data-theme=evening] #room h3,
body[data-theme=evening] #clientDesk h1,
body[data-theme=evening] #clientDesk h2,
body[data-theme=evening] #clientInbox h2 {
  color: #f6ecdb;
}
body[data-theme=evening] #dayDesk > header .eyebrow,
body[data-theme=evening] .folio-head .eyebrow,
body[data-theme=evening] #album .eyebrow,
body[data-theme=evening] #deskWork > small,
body[data-theme=evening] #clientDesk > small,
body[data-theme=evening] #clientInbox > small,
body[data-theme=evening] .mb-head small,
body[data-theme=evening] .mb-turns small {
  color: #d8bc8b;
}
body[data-theme=evening] #deskThemeToggle {
  background: #3a2e25;
  border-color: #c8a468;
  color: #f8edd9;
}
body[data-theme=evening] #deskWork,
body[data-theme=evening] #deskShelf,
body[data-theme=evening] #clientInbox,
body[data-theme=evening] #clientDesk,
body[data-theme=evening] #album:not([hidden]),
body[data-theme=evening] #albumDetail,
body[data-theme=evening] #clientMacro,
body[data-theme=evening] #loupe,
body[data-theme=evening] #room .pattern,
body[data-theme=evening] #slots button {
  background: linear-gradient(155deg, #322821, #28201b) !important;
  color: #f3e8d6 !important;
  border-color: #63513d !important;
}
body[data-theme=evening] #deskWork > p,
body[data-theme=evening] #deskGems span,
body[data-theme=evening] #deskShelf p,
body[data-theme=evening] .lead,
body[data-theme=evening] #albumCaption,
body[data-theme=evening] .album-cue,
body[data-theme=evening] #benchLossTip {
  color: #d0c1aa !important;
}
body[data-theme=evening] #albumCaption { background: #332922d9 !important; }
body[data-theme=evening] #deskSketches [data-desk-sketch] {
  background: #382d25;
  border-color: #6c5942;
  box-shadow: inset 0 0 0 2px #473a30;
}
body[data-theme=evening] .desk-resume-mount,
body[data-theme=evening] #deskSketches canvas,
body[data-theme=evening] .cl-sketches canvas {
  background: radial-gradient(circle at 50% 45%, #44372d, #312720) !important;
  border: 1px solid #64513c;
  border-radius: 4px;
}
body[data-theme=evening] #deskSketches strong { color: #f6ecdb; }
body[data-theme=evening] .desk-objects {
  background: linear-gradient(180deg, #2b221c, #221a15) !important;
  border-color: #5e4d3a !important;
}
body[data-theme=evening] .desk-objects [data-object],
body[data-theme=evening] .desk-objects #endlessOpen {
  color: #f3e8d6;
}
body[data-theme=evening] #dayDesk .desk-objects [data-object] span,
body[data-theme=evening] #dayDesk .desk-objects #endlessOpen span {
  background: #392e25 !important;
  color: #f5ead8 !important;
  border: 1px solid #6b573e;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}
body[data-theme=evening] #deskCTA,
body[data-theme=evening] button.gold,
body[data-theme=evening] #mineralEnd #benchFinish,
body[data-theme=evening] #mineralEnd #benchRetry:not([hidden]) {
  background: #3b6b58 !important;
  border-color: #5d907b !important;
  color: #fff9ee !important;
}
body[data-theme=evening] #deskCTA:disabled {
  background: #3c3631 !important;
  border-color: #574e46 !important;
  color: #9e9486 !important;
}
body[data-theme=evening] button:not(.mb-cell):not(.lb-cell):not(#deskCTA):not(.gold):not(#benchFinish):not(#benchRetry):not(.rv-close):not([data-object]):not(#endlessOpen):not(#deskThemeToggle) {
  background: #382d25;
  border-color: #6d5942;
  color: #f3e8d6;
}
body[data-theme=evening] button[aria-pressed=true]:not(.mb-cell):not(.lb-cell):not(#deskThemeToggle) {
  background: #4e3d2d;
  border-color: #d6b172;
  color: #fff6e4;
}
body[data-theme=evening] #deskHome {
  background: transparent !important;
  border: 0 !important;
  color: #a9dbc4 !important;
}

/* --- Evening Workbench --- */
body[data-theme=evening] #bench .mineral-bench {
  background: linear-gradient(170deg, #2a221c, #211a16) !important;
  color: #f3e8d6 !important;
  border-color: #5e4d3a !important;
}
body[data-theme=evening] #bench .mineral-bench::before,
body[data-theme=evening] #bench .mineral-bench::after {
  filter: brightness(.34) sepia(.28) contrast(1.06);
}
body[data-theme=evening] #bench .mb-head {
  background: linear-gradient(180deg, #322821, #29211b) !important;
  border-bottom: 1px solid #5f4d39 !important;
  color: #f6ecdb !important;
}
body[data-theme=evening] #bench .mb-head h2 { color: #fbf2e1 !important; }
body[data-theme=evening] #bench .mb-order {
  background: #332922 !important;
  border-color: #64523e !important;
  color: #f3e8d6 !important;
}
body[data-theme=evening] #bench .mb-order #recipe,
body[data-theme=evening] #bench .mb-order #recipe span {
  color: #f3e8d6 !important;
}
body[data-theme=evening] #bench .mb-order [data-filled=true] { color: #8ad6b1 !important; }
body[data-theme=evening] #bench .mineral-bench[data-rare=true] .mb-order [data-quality-state=basic] { color: #f0b86c !important; }
body[data-theme=evening] #bench .mb-tray {
  background: radial-gradient(circle at 50% 45%, #302c28, #221f1d) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .48), 0 0 0 1px #725e46 !important;
}
body[data-theme=evening] #bench .mb-status {
  background: #2f251f !important;
  border-color: #5e4c38 !important;
  color: #ece0cc !important;
}
body[data-theme=evening] #bench .mb-status[data-idle-tip=yes] { color: #f5d183 !important; }
body[data-theme=evening] #benchBack.mb-back {
  background: #3a2e25 !important;
  border-color: #7d674a !important;
  color: #f5ead6 !important;
}
body[data-theme=evening] #miniSetBar.mb-miniset {
  background: #3a2e25;
  border-color: #7a6345;
  color: #e8cfa0;
}
body[data-theme=evening] #bench #mineralEnd {
  background: linear-gradient(160deg, #352a23, #29201b) !important;
  border-color: #7d6547 !important;
  color: #f5ead8 !important;
}
body[data-theme=evening] #bench #benchMoreDialog {
  background: #2f251f;
  color: #f3e8d6;
  border-color: #796246;
}
body[data-theme=evening] #bench #benchMoreDialog::backdrop { background: rgba(10, 7, 5, .72); }
body[data-theme=evening] #miniSetPause.mb-pause-card {
  background: linear-gradient(160deg, #3f2f25, #2f221b);
  border-color: #c9a366;
  color: #f7ecd9;
}
body[data-theme=evening] #miniSetPause .mp-eyebrow { color: #e4c385; }
body[data-theme=evening] #miniSetPause .mp-title { color: #fff6e6; }
body[data-theme=evening] #miniSetPause .mp-note { color: #d8c6ae; }

/* --- Evening Personal Box (full harmony across tray, palettes, fitting, preview & all 4 postcards) --- */
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) {
  background: linear-gradient(165deg, #2d241e, #231c17);
  border-color: #6a5741;
  color: #f3e8d6;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) :is(h1, h2, h3, strong, dt, dd) {
  color: #f7ecda;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) > small,
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) .pb-studio .pb-style-label,
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) .pb-postcard-meta {
  color: #d9bf91;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) :is(.pb-studio, .pb-pair article, .pb-favs article, .pb-parade article, .pb-print-list li, .pb-print-note) {
  background: #362b23;
  border-color: #6a5741;
  color: #f3e8d6;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) :is(.pb-tray button, .pb-tray .pb-made, .pb-tray .pb-setting, .pb-tray .pb-silhouette) {
  background: #372c24;
  border-color: #6a5741;
  color: #f3e8d6;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) .pb-tray .pb-made {
  border-color: #a98952;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) .pb-tray .pb-made span {
  color: #8be0b8;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) :is(.pb-print-list small, .pb-tray small, .pb-favs small, .pb-favs p) {
  color: #d5c4ac;
}
body[data-theme=evening] #personalBox:not([data-card=pearl]):not([data-card=velvet]):not([data-card=botanical]) button[aria-pressed=true] {
  background: #614b34 !important;
  border-color: #d8b87d !important;
  color: #fff6e4 !important;
}
/* Protect intentional keepsake postcard palettes (pearl, botanical, velvet) against generic evening button overrides */
body[data-theme=evening] #personalBox[data-card=pearl] button {
  background: #fff9f5 !important;
  border-color: #c89f93 !important;
  color: #462b30 !important;
}
body[data-theme=evening] #personalBox[data-card=pearl] button[aria-pressed=true] {
  background: #efd6d2 !important;
  border-color: #945b63 !important;
  color: #3c1f25 !important;
  font-weight: 600;
}
body[data-theme=evening] #personalBox[data-card=botanical] button {
  background: #f6faf2 !important;
  border-color: #83977b !important;
  color: #24382d !important;
}
body[data-theme=evening] #personalBox[data-card=botanical] button[aria-pressed=true] {
  background: #d2e1ca !important;
  border-color: #4b6c55 !important;
  color: #1c2f25 !important;
  font-weight: 600;
}
body[data-theme=evening] #personalBox[data-card=velvet] button {
  background: #3e202c !important;
  border-color: #b7955c !important;
  color: #fbf1df !important;
}
body[data-theme=evening] #personalBox[data-card=velvet] button[aria-pressed=true] {
  background: #c8a366 !important;
  border-color: #f6dfad !important;
  color: #221118 !important;
  font-weight: 600;
}

/* Never apply dimming filters to canvases, portraits or crystals in evening mode */
body[data-theme=evening] canvas,
body[data-theme=evening] #mineralBoard,
body[data-theme=evening] #portrait,
body[data-theme=evening] #albumPortrait {
  filter: none !important;
}
