/* The guarantee meter and Shards (Gage 11-04, js/spin-meter.js). Field-journal plates: inked frame, steel track, the floor
   rarity's colour (--rc) for the fill. Motion is the fill, a gleam and the hit flash; reduced motion and calm set it still. */
.spin-meter { display: grid; gap: 4px; width: 100%; max-width: 360px; margin: 6px auto 0; text-align: left; --fill: 0; }
.spin-meter .sm-label { font: 600 12px/1.2 var(--ui, inherit); letter-spacing: .04em; color: #efe3c6; text-shadow: 0 1px #000a; }
.spin-meter .sm-bar { display: grid; grid-template-columns: 1fr 24px; gap: 4px; align-items: center; }
.spin-meter .sm-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 12px; padding: 2px; border: 1px solid #6f5f3e; border-radius: 2px; background: linear-gradient(#0d0c0b, #24201a); box-shadow: inset 0 1px 3px #000c; overflow: hidden; }
.spin-meter .sm-track i { position: relative; z-index: 2; border-left: 2px solid #0d0c0b; }
.spin-meter .sm-track i:first-of-type { border-left: 0; }
.spin-meter .sm-fill { position: absolute; z-index: 1; left: 2px; top: 2px; bottom: 2px; width: calc((100% - 4px) * var(--fill)); background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 55%, #fff), var(--rc) 55%, color-mix(in srgb, var(--rc) 70%, #000)); box-shadow: 0 0 8px color-mix(in srgb, var(--rc) 70%, transparent); }
.spin-meter.moving .sm-fill { transition: width .9s cubic-bezier(.2, .9, .25, 1); }
.spin-meter .sm-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #fff9 50%, transparent 70%); background-size: 220% 100%; background-position: 120% 0; opacity: 0; }
.spin-meter.gleam .sm-fill::after { animation: sm-gleam 1.1s .35s ease-out both; }
@keyframes sm-gleam { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 0; background-position: -60% 0; } }
.spin-meter .sm-goal { display: grid; place-items: center; height: 20px; border: 1px solid color-mix(in srgb, var(--rc) 60%, #4b402c); border-radius: 2px; background: #15130f; font-style: normal; }
.spin-meter .sm-pips { display: flex; gap: 1px; }
.spin-meter .sm-pips i { width: 3px; height: 8px; background: #3a342a; }
.spin-meter .sm-pips i.on { background: var(--rc); }
.spin-meter.full .sm-goal, .spin-meter.due .sm-goal { background: color-mix(in srgb, var(--rc) 35%, #15130f); box-shadow: 0 0 10px var(--rc); }
.spin-meter.full .sm-label, .spin-meter.due .sm-label { color: color-mix(in srgb, var(--rc) 45%, #fff); }
.spin-meter.ready .sm-goal { animation: sm-ready 1.4s ease-in-out infinite; }
@keyframes sm-ready { 50% { box-shadow: 0 0 18px var(--rc), 0 0 4px #fff; } }
.spin-meter.hit .sm-track { animation: sm-hit .5s ease-out; }
.spin-meter.hit .sm-label { color: color-mix(in srgb, var(--rc) 40%, #fff); }
@keyframes sm-hit { 0% { box-shadow: inset 0 0 0 40px var(--rc); } 100% { box-shadow: inset 0 1px 3px #000c; } }
/* In a Supply tile: one line, smaller. */
.spin-meter.mini { max-width: 210px; margin-top: 4px; gap: 3px; }
.spin-meter.mini .sm-label { font-size: 10.5px; text-align: center; }
.spin-meter.mini .sm-bar { grid-template-columns: 1fr 18px; }
.spin-meter.mini .sm-track { height: 9px; }
.spin-meter.mini .sm-goal { height: 15px; }
.spin-machine .spin-progress .spin-meter { margin-top: 4px; }
.spin-supply > .spin-meter.mini, #tab-shop .spin-supply > .spin-meter.mini { grid-column: 1 / -1; justify-self: stretch; max-width: none; }
/* The result: the meter and the Shards sit in the header, above the machine and its prizes. */
.spin-machine .setup-head .spin-after { padding: 0; }
.spin-machine .setup-head .shard-strip { grid-template-columns: 44px 1fr auto; margin-top: 4px; padding: 6px 8px; }
.spin-machine .setup-head .shard-strip .ss-pic { width: 44px; height: 44px; }
.spin-machine .setup-head .shard-strip .ss-text b { font-size: 15px; }

/* Shards: "8/30 shards to <item>". */
.shard-ico { width: 1em; height: 1em; vertical-align: -.12em; color: #8fd8ff; margin-right: 3px; filter: drop-shadow(0 0 3px #64c8ff88); }
.shard-strip { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; margin: 10px 0 0; padding: 8px 10px; border: 1px solid #6f5f3e; border-bottom-width: 3px; border-radius: 3px; background: linear-gradient(120deg, color-mix(in srgb, var(--rc, #4f9fe8) 16%, #1b1814), #15130f); box-shadow: inset 0 0 0 2px #0f0d0b; text-align: left; --sf: 0; }
.shard-strip .ss-pic { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid color-mix(in srgb, var(--rc, #4f9fe8) 60%, #3b3326); background: #0f0e0c; overflow: hidden; }
.shard-strip .ss-pic img { width: 100%; height: 100%; object-fit: contain; }
.shard-strip .ss-pic > .shard-ico { width: 26px; height: 26px; margin: 0; }
.shard-strip .ss-text { display: grid; gap: 3px; min-width: 0; }
.shard-strip .ss-text small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8fd8ff; }
.shard-strip .ss-text b { font: 400 17px/1.1 var(--display, inherit); color: #fbf4e4; overflow-wrap: anywhere; }
.shard-strip .ss-sub { font-size: 12px; color: #b9ad94; }
.shard-strip .ss-bar { position: relative; height: 8px; border: 1px solid #4c4332; background: #0d0c0b; overflow: hidden; }
.shard-strip .ss-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% * var(--sf)); background: linear-gradient(90deg, #4f9fe8, #8fd8ff); box-shadow: 0 0 8px #64c8ff99; }
.shard-strip.grow .ss-bar i { width: calc(100% * var(--sf0)); }
.shard-strip.grow.grown .ss-bar i { width: calc(100% * var(--sf)); transition: width 1s .25s cubic-bezier(.2, .9, .25, 1); }
.shard-strip.ready { border-color: #d9b45b; box-shadow: inset 0 0 0 2px #0f0d0b, 0 0 12px #d9b45b55; }
.shard-strip .btn { white-space: nowrap; }
.spin-after { display: grid; gap: 6px; padding: 0 2px 4px; }
.spin-after .spin-meter { max-width: none; }
.rp-shards { display: inline-flex; align-items: center; justify-self: center; gap: 2px; margin-top: 2px; padding: 2px 7px; border: 1px solid #3f6f8f; border-radius: 10px; background: #0f1b24; font: 600 11px/1.2 var(--ui, inherit); font-style: normal; color: #bfe8ff; }
.crate-shards { margin: 6px 0 0; }

/* The odds sheet: the guarantee and the Shards, under the odds they change. */
.spin-odds-pity { display: grid; gap: 4px; margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--rc, #8fd8ff); background: #ffffff08; text-align: left; }
.spin-odds-pity b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--rc, #8fd8ff) 50%, #fff); }
.spin-odds-pity p { margin: 0; font-size: 12.5px; line-height: 1.35; color: #ddd2bb; }
.spin-odds-pity.shards { --rc: #8fd8ff; }

/* The target picker. */
.shard-picker .shard-group h3 { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font: 400 16px var(--display, inherit); text-transform: uppercase; color: color-mix(in srgb, var(--rc) 55%, #fff); }
.shard-picker .shard-group h3 .rp-pips i.on { background: var(--rc); }
.shard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.shard-item { display: grid; gap: 3px; justify-items: center; min-width: 0; padding: 6px 6px 8px; border: 1px solid color-mix(in srgb, var(--rc) 45%, #3b3326); border-bottom-width: 3px; border-radius: 3px; background: #15130f; color: #efe3c6; text-align: center; }
.shard-item .si-pic { display: block; width: 100%; aspect-ratio: 3 / 2; background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%); }
.shard-item .si-pic img { width: 100%; height: 100%; object-fit: contain; }
.shard-item b { font-size: 12.5px; line-height: 1.15; overflow-wrap: anywhere; }
.shard-item small { font-size: 10.5px; color: #a99e86; }
.shard-item.on { border-color: #8fd8ff; box-shadow: 0 0 0 2px #8fd8ff66; }
.shard-item.ready small { color: #e8d08c; }
.shard-claimed .spin-landed { display: grid; justify-items: center; }
.shard-claimed .spin-landed .spin-prize { width: min(100%, 260px); --pic-h: 150px; }

@media (prefers-reduced-motion: reduce) {
  .spin-meter.moving .sm-fill, .shard-strip.grow.grown .ss-bar i { transition: none; }
  .spin-meter.gleam .sm-fill::after, .spin-meter.ready .sm-goal, .spin-meter.hit .sm-track { animation: none; }
}
