/* A registered 3:2 engraving and three independent interchangeable parts. */
#shop-overlay .shop-item[data-shop-item="memory"]:has(.memory-workshop) {
  display:block; min-height:0; padding:0; border:0; box-shadow:none; background:transparent; overflow:visible;
}
#shop-overlay .shop-item[data-shop-item="memory"]:has(.memory-workshop)::before,
#shop-overlay .shop-item[data-shop-item="memory"]:has(.memory-workshop)::after { display:none; }
#shop-overlay .shop-item[data-shop-item="memory"]:has(.memory-workshop)>div:not(.memory-workshop) {
  display:block; padding:0; background:none;
}
#shop-overlay .shop-item[data-shop-item="memory"] .memory-heading h3,
.meta-panel .memory-heading h3 { margin:0; font:600 var(--type-heading)/1.14 var(--serif); }
.memory-workshop { --wagon-ink:#392e21; --wagon-line:#b29c73; --wagon-paper:#f2e5c9; --wagon-action:#385447; min-width:0; color:var(--wagon-ink); }
.memory-workshop .memory-applies { margin:5px 0 16px; color:#62513a; font:400 var(--type-body)/1.35 var(--sans); }
.memory-book { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(250px,.8fr); gap:0; overflow:hidden; border:1px solid #9b8258; border-radius:7px; background:var(--wagon-paper); box-shadow:0 5px 14px #50381d22; }
.memory-folio { min-width:0; align-self:stretch; display:flex; flex-direction:column; justify-content:center; background:#293c32; }
.memory-scene { position:relative; isolation:isolate; display:block; width:100%; aspect-ratio:3 / 2; overflow:hidden; background:#dcc49b; border-bottom:1px solid #aa8c5a; }
.memory-scene img, .memory-leaders { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.memory-scene::after { content:""; position:absolute; inset:0; z-index:1; box-shadow:inset 0 0 28px #583a1e21; pointer-events:none; }
.memory-leaders { stroke:#634d2c; stroke-width:2.3; filter:drop-shadow(0 1px 1px #ffecc6); }
.memory-workshop button { font-family:var(--sans); cursor:pointer; touch-action:manipulation; }
.memory-workshop button:focus-visible { outline:3px solid #167269; outline-offset:2px; box-shadow:0 0 0 3px #fff4d7; }
.memory-scene .memory-pin { position:absolute; z-index:2; display:grid; place-items:center; width:48px; height:48px; min-width:48px; min-height:48px;
  margin:-24px 0 0 -24px; transform:none; padding:0; color:#483b29; border:0; border-radius:50%; background:transparent; box-shadow:none; }
.memory-scene .memory-pin::before { position:absolute; content:""; inset:5px; z-index:-1; background:#f5e6c8; border:1px solid #836a42; border-radius:50%; box-shadow:0 1px 4px #3f291c5c,inset 0 0 0 2px #fbefd8; }
.memory-scene .memory-pin[aria-pressed="true"] { color:#fff2c9; }
.memory-scene .memory-pin[aria-pressed="true"]::before { background:#314c40; border:2px solid #efe0af; box-shadow:0 0 0 1px #293b2e,0 2px 4px #35241675; }
.memory-scene .memory-pin svg { width:23px; height:23px; }
.memory-scene .memory-pin:focus-visible { outline-offset:0; box-shadow:none; }
.memory-pin[data-memory-select="canopy"] { left:35%; top:12%; }
.memory-pin[data-memory-select="wheels"] { left:15%; top:86%; }
.memory-pin[data-memory-select="lantern"] { left:91%; top:62%; }
.memory-parts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:7px; background:#293c32; }
.memory-parts button { display:flex; justify-content:center; align-items:center; gap:7px; min-height:48px; min-width:0; padding:7px 5px; border:1px solid #8f967b; border-radius:4px; background:#34463a; color:#f8eacb; box-shadow:none; font:600 var(--type-body)/1.2 var(--sans); white-space:normal; overflow-wrap:anywhere; }
.memory-parts button[aria-pressed="true"] { color:#372e20; background:#efdab0; border-color:#e5c68a; box-shadow:inset 0 -3px #ae864c; }
.memory-part svg { display:block; flex:none; width:23px; height:23px; }
.memory-details { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:clamp(15px,2vw,25px); border-left:1px solid #a38a63; background:radial-gradient(ellipse at 30% 20%,#fff5df 0%,#f0e2c6 75%,#e5d2ae); }
.memory-part-heading { display:flex; align-items:center; gap:10px; min-width:0; }
.memory-part-heading>svg { flex:none; width:38px; height:38px; padding:5px; border-radius:50%; border:1px solid #9c8866; color:#556048; }
.memory-part-heading h4 { color:#3a3125; margin:0; font:600 var(--type-heading)/1.1 var(--serif); overflow-wrap:anywhere; }
.memory-part-heading span { color:#68583f; font:400 var(--type-caption)/1.3 var(--sans); }
.memory-workshop .memory-effect { margin:15px 0 5px; font:600 var(--type-body)/1.35 var(--sans); color:#3e382b; }
.memory-gains { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; padding:8px 0; border-block:1px solid #b29c735e; }
.memory-gains>div { min-width:0; }
.memory-gains>div+div { padding-left:14px; border-left:1px solid #b29c737d; }
.memory-gains dt { font:400 var(--type-caption)/1.3 var(--sans); color:#63553e; }
.memory-gains dd { font:600 var(--type-heading)/1.15 var(--serif); color:#4a3c2c; margin:2px 0 0; overflow-wrap:anywhere; }
.memory-gains>div+div dd { color:#34563f; }
.memory-workshop .memory-capacity, .memory-workshop .memory-saving { color:#5d533e; margin:7px 0 0; font:400 var(--type-caption)/1.35 var(--sans); }
.memory-workshop .memory-preview { display:inline-flex; align-items:center; align-self:flex-start; gap:7px; min-height:48px; min-width:48px; margin:0; padding:5px 0; color:#475543; background:transparent; box-shadow:none; border:0; font:600 var(--type-caption)/1.3 var(--sans); text-align:left; }
.memory-preview svg { width:21px; height:21px; flex:none; }
.memory-preview[aria-pressed="true"] span { text-decoration:underline; text-underline-offset:3px; }
.memory-invest { display:grid; gap:8px; min-width:0; }
.memory-progress { display:grid; gap:5px; font:400 var(--type-caption)/1.3 var(--sans); color:#52452f; }
.memory-progress progress { appearance:none; width:100%; height:8px; border:0; border-radius:3px; overflow:hidden; background:#d7c7a6; accent-color:#8b7843; }
.memory-progress progress::-webkit-progress-bar { background:#d7c7a6; }
.memory-progress progress::-webkit-progress-value { background:#8b7843; }
.memory-progress progress::-moz-progress-bar { background:#8b7843; }
.memory-workshop .memory-pay { display:flex; align-items:center; justify-content:center; min-width:0; width:100%; gap:8px; min-height:49px; padding:9px 12px; border:1px solid #234135; border-radius:4px; background:var(--wagon-action); color:#fff4d6; font:600 var(--type-body)/1.3 var(--sans); white-space:normal; overflow-wrap:anywhere; box-shadow:inset 0 0 0 2px #c7d1ac23; }
.memory-pay img { flex:none; display:block; width:27px; height:27px; object-fit:contain; border-radius:3px; }
.memory-workshop .memory-pay:disabled { cursor:default; opacity:1; background:#dfd4b9; border:1px dashed #9b8e72; color:#615442; box-shadow:none; }
.memory-workshop .memory-max { padding:10px 0 0; margin:0; color:#3a5340; font:600 var(--type-body)/1.35 var(--sans); }
.meta-panel:has(.memory-workshop) .memory-applies { color:inherit; }
.memory-workshop[data-workshop-entry="quick"] { container-type:inline-size; }
@container (max-width:590px) {
  .memory-workshop[data-workshop-entry="quick"] .memory-book { grid-template-columns:minmax(0,1fr); }
  .memory-workshop[data-workshop-entry="quick"] .memory-details { border-left:0; }
}
@media(max-width:700px) {
  .memory-book { grid-template-columns:minmax(0,1fr); }
  .memory-details { border-left:0; }
  .memory-workshop .memory-applies { margin-bottom:10px; }
  .memory-part-heading h4 { font-size:var(--type-heading); }
  .memory-scene .memory-pin::before { inset:7px; }
  .memory-parts { gap:3px; padding:5px; }
  .memory-parts button { gap:3px; padding-inline:3px; font-size:var(--type-caption); }
  .memory-part svg { width:19px; height:19px; }
}
@media(hover:hover) {
  .memory-workshop .memory-pay:not(:disabled):hover { background:#4a634f; }
  .memory-parts button:not([aria-pressed="true"]):hover { background:#4b5b48; }
  .memory-workshop .memory-preview:hover span { text-decoration:underline; }
}
@media(max-width:365px) {
  #shop-overlay:has(.memory-workshop) .shop-header { padding-inline:10px; gap:5px; }
  #shop-overlay:has(.memory-workshop) .shop-header h2 { font-size:1.35rem; }
  #shop-overlay:has(.memory-workshop) .shop-tabs button { font-size:.77rem; }
  .memory-parts button { flex-direction:column; gap:2px; padding:3px 2px; line-height:1.1; }
  .memory-part svg { width:17px; height:17px; }
}
