/* jarlings.xyz v8: one-tap jars. "Your jars" strip at the top of the home page and the Open all run.
   Pure presentation for new elements only (.mj-*, .oa-*); nothing the existing JS reads is renamed or removed. */
.mj { position: relative; z-index: 2; background: linear-gradient(180deg, #0b110f, #070a09); border-bottom: 2px solid #000; box-shadow: inset 0 -1px 0 rgba(110, 240, 150, .18); color: var(--cream); }
html[data-route='home'] .mj { padding-top: 84px; }
.mj-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 14px 0; }
.mj-bar .v2-btn { font-size: 22px; padding: 10px 18px 9px; }
.mj-wrap { padding: 16px 0 18px; display: grid; gap: 14px; }
.mj-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.mj-h { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(22px, 2.6vw, 32px); margin: 0; }
.mj-t { font-family: var(--term); font-size: 20px; margin: 0; color: rgba(238, 230, 208, .8); }
.mj-t b { color: var(--yellow); font-weight: 400; }
.mj-head .mj-t { flex: 1 1 260px; }
.mj-hams { display: flex; gap: 8px; }
.mj-ham { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; background: #141c1a; color: var(--cream); border: 2px solid #000; box-shadow: 0 3px 0 #000; font-family: var(--term); font-size: 18px; cursor: pointer; }
.mj-ham img { width: 32px; height: 32px; image-rendering: pixelated; }
.mj-ham span { display: grid; line-height: 1; text-align: left; }
.mj-ham b { color: var(--green); font-weight: 400; }
.mj-ham.on { background: var(--yellow); color: #1b1405; }
.mj-ham.on b { color: #1b1405; }
.mj-ham:focus-visible, .mj-jar:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.mj-all { font-size: 22px; padding: 10px 18px 9px; }
.mj-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; align-items: flex-end; }
/* the jar art itself, at pixel scale, standing on a little lit shelf */
.mj-jar { position: relative; flex: 0 0 auto; width: 92px; padding: 0 0 18px; background: none; border: 0; cursor: pointer; scroll-snap-align: start; color: var(--cream); }
.mj-jar img { display: block; width: 92px; height: 92px; image-rendering: pixelated; border-radius: 10px; transition: transform .15s; }
.mj-jar::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 14px; height: 4px; background: #2b3533; box-shadow: 0 2px 0 #000, 0 -6px 14px rgba(110, 240, 150, .12); }
.mj-n { position: absolute; left: 0; right: 0; bottom: 0; font-family: var(--term); font-size: 16px; text-align: center; color: rgba(238, 230, 208, .7); }
.mj-jar.sealed .mj-n::after { content: ' sealed'; color: var(--yellow); }
.mj-jar:hover img, .mj-jar:focus-visible img { transform: translateY(-4px) rotate(-3deg); }
.mj-more { flex: 0 0 auto; align-self: center; font-family: var(--term); font-size: 20px; color: var(--green); padding: 0 10px; white-space: nowrap; }

/* Open all */
.moment-card.oa-wide { width: min(720px, 100%); }
.oa-body { display: grid; gap: 12px; justify-items: center; }
.oa-gold { font-family: var(--term); font-size: 19px; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.oa-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 18px 4px 4px; }
.oa-cell { position: relative; margin: 0; width: 72px; display: grid; justify-items: center; gap: 2px; }
.oa-cell > img:first-child { width: 72px; height: 72px; image-rendering: pixelated; border-radius: 8px; transition: opacity .3s, filter .3s; }
.oa-cell figcaption { font-family: var(--term); font-size: 15px; opacity: .75; }
.oa-ham { position: absolute; width: 34px; height: 34px; right: -8px; top: -16px; image-rendering: pixelated; opacity: 0; pointer-events: none; transform-origin: 80% 80%; }
.oa-cell.now .oa-ham { opacity: 1; animation: oa-swing .55s ease-in-out infinite; }
.oa-cell.now > img:first-child { animation: oa-shake .55s ease-in-out infinite; }
.oa-cell.done > img:first-child { animation: oa-pop .45s ease-out; }
.oa-cell.done figcaption { color: var(--green); opacity: 1; }
.oa-cell.fail > img:first-child { filter: grayscale(1) brightness(.6); }
.oa-cell.fail figcaption { color: #e2553f; opacity: 1; }
.oa-fail { font-family: var(--term); font-size: 17px; text-align: left; max-width: 100%; }
.oa-fail ul { margin: 6px 0 0; padding-left: 18px; }
@keyframes oa-swing { 0%, 100% { transform: rotate(-35deg); } 45% { transform: rotate(25deg); } 55% { transform: rotate(20deg); } }
@keyframes oa-shake { 0%, 40%, 100% { transform: none; } 48% { transform: translateX(-2px) rotate(-2deg); } 56% { transform: translateX(2px) rotate(2deg); } }
@keyframes oa-pop { 0% { transform: scale(.7); filter: brightness(2.4); } 60% { transform: scale(1.12); } 100% { transform: none; filter: none; } }
@media (max-width: 640px) { .mj-jar, .mj-jar img { width: 76px; } .mj-jar img { height: 76px; } .mj-head .v2-btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .mj-jar img, .mj-jar:hover img { transition: none; transform: none; }
  .oa-cell.now .oa-ham, .oa-cell.now > img:first-child, .oa-cell.done > img:first-child { animation: none; }
  .oa-cell.now .oa-ham { opacity: 1; }
  .oa-cell.now > img:first-child { outline: 2px solid var(--yellow); outline-offset: 2px; }
}
