/* Armory previews (Gage 10-29): every weapon, tactic and doctrine has a Preview button; it opens a small stage that plays the real
   effect at the mark you pick. The stage is the existing .ab-live box (style.css); these are the button, the mark chooser and
   the labels over the stage. Decoration stays behind the controls and reduced motion shows a still (js/preview.js). */
.tac .peek, .perk .peek { grid-column: 2 / 4; justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; margin-top: 6px;
  color: #f1e6cd; background: linear-gradient(160deg, #3a3126, #1f1c18); border: 1px solid #c7a96f66; box-shadow: 0 2px #080908, inset 0 1px #f1dfb61c; font: 400 15px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.tac .peek .wi, .perk .peek .wi { width: 18px; height: 18px; }
.tac .peek:active, .perk .peek:active { transform: translateY(2px); box-shadow: none; }
.pv-open { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; min-height: 46px; }
.pv-open .wi { width: 22px; height: 22px; }

.pv-sheet .pv-lv { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 12px 0 4px; }
.pv-chip { min-height: 40px; padding: 4px 2px; font: 400 16px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: #cfc4ae; background: #181512; border: 1px solid #5a4b39aa; border-bottom: 3px solid #5a4b39; box-shadow: 2px 2px 0 #000; cursor: pointer; }
.pv-chip.own { color: #f2eee6; border-color: #8a7254; }
.pv-chip.gold { color: #ffd36e; border-style: dashed; border-color: #d9a531aa; }
.pv-chip.on { background: #8d272b; color: #fff; border-color: #f17d62; border-bottom-color: #f6c4a9; }
.pv-chip.gold.on { background: linear-gradient(170deg, #ffe08a, #d9a531); color: #2a1d05; border-color: #fff1b8; }
.pv-chip:focus-visible { outline: 2px solid #ffca8c; outline-offset: 2px; }

.pv-stage { margin: 10px 0 8px; }
.pv-tag { position: absolute; left: 6px; top: 6px; z-index: 3; max-width: calc(100% - 12px); padding: 3px 8px; font: 400 14px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #f2eee6; background: #000b; border-left: 3px solid var(--ab, #e0242d); pointer-events: none; }
.pv-read { position: absolute; left: 6px; right: 6px; bottom: 12px; z-index: 3; white-space: pre-line; font: 400 15px/1.25 var(--display); letter-spacing: .03em; color: #f2eee6; text-shadow: 1px 1px 0 #000, 0 0 6px #000; pointer-events: none; }
.pv-read:empty { display: none; }
.pv-stage[data-phase=result] .pv-read { background: #000b; padding: 5px 8px; color: #b9f0b4; right: auto; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #000a; z-index: 3; pointer-events: none; }
.pv-bar b { display: block; height: 100%; width: 0; background: var(--ab, #e0242d); }
.pv-line { margin: 4px 0 6px; font: 400 18px/1.25 var(--display); letter-spacing: .02em; color: #f2eee6; }
.pv-note { margin: 6px 0 10px; font-size: 12px; line-height: 1.4; color: var(--muted, #b3aaa0); }
.pv-sheet .actions { display: flex; gap: 8px; } .pv-sheet .actions .btn { flex: 1; }
@media (max-width: 360px) {
  .pv-chip { font-size: 14px; min-height: 36px; }
  .pv-read { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .tac .peek, .perk .peek { transition: none; } }

/* Gage 10-29: "make sure all the previews are obvious in the descriptive for everything in the armory area". One Preview control on every
   weapon, tactic and doctrine card, on the two equipped doctrine slots and in the detail sheet: a round play button, "Preview in a match"
   and, under it, one line on what the clip shows. At least 46 px tall, always the full width of its card. */
.pv-btn { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin: 8px 0 0; padding: 6px 12px 6px 7px; text-align: left; color: #f6ecd4;
  background: linear-gradient(160deg, #46381f, #211b14); border: 1px solid #d9b46a; box-shadow: 0 3px #080908, 3px 4px 0 #050505, inset 0 1px #f1dfb62e; cursor: pointer; touch-action: manipulation; }
.pv-btn:active { transform: translateY(2px); box-shadow: 0 1px #080908; }
.pv-play { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #3a4a2a, #121a0d 72%); border: 2px solid #d9b46a; box-shadow: 0 2px 0 #000; }
.pv-play svg { width: 26px; height: 26px; margin-left: 2px; }
.pv-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-txt b { font: 400 19px/1 var(--display); letter-spacing: .07em; text-transform: uppercase; color: #fff4d6; }
.pv-txt small { font-size: 13px; line-height: 1.2; color: #d3c6aa; white-space: normal; }
.pv-btn.compact { min-height: 48px; margin-top: 6px; }
.pv-btn.compact .pv-play { flex-basis: 36px; width: 36px; height: 36px; }
.pv-btn.compact .pv-play svg { width: 22px; height: 22px; }
.pv-btn.compact .pv-txt b { font-size: 16px; }
.pv-btn.compact .pv-txt small { font-size: 12px; }
.pv-open.pv-btn { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { .pv-btn { transition: none; } .pv-btn:active { transform: none; } }

/* The two equipped doctrines (Gage 10-29: "you should be able to have two perks selected at the same time"). */
.pslots { display: grid; gap: 10px; }
.pslot { padding: 8px; background: #1d1b1b; border: 1px solid #3a3434; box-shadow: 3px 3px 0 #000; }
.pslot.full { border-color: #c7a96f99; background: linear-gradient(170deg, #26221b, #1a1817); }
.pslot-row { display: flex; align-items: stretch; gap: 8px; }
.pslot-main { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 4px 6px; text-align: left; background: transparent; color: inherit; }
.pslot.on:not(.full) .pslot-main { outline: 2px dashed var(--red-b, #e0242d); outline-offset: -2px; }
.pslot-main .ab { flex: 0 0 44px; width: 44px; height: 44px; }
.pslot-main .ab .wi { width: 32px; height: 32px; }
.pslot-main i { display: block; font: 400 12px/1 var(--display); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #b9ab8a; }
.pslot-main b { display: block; margin: 3px 0 2px; font: 400 26px/1 var(--display); text-transform: uppercase; }
.pslot-main small { display: block; color: var(--muted); font-size: 13px; line-height: 1.2; }
.pslot-x { flex: 0 0 46px; display: grid; place-items: center; background: #2a2424; border: 1px solid #4a3f3f; color: #e8dccb; }
.pslot-x .wi { width: 22px; height: 22px; }
.perk-off { display: block; margin-top: 3px; color: #d9a441; font-size: 12px; }
.perk.equipped { background: linear-gradient(90deg, #b9f07a14, transparent 60%); }
.tag.eq { color: #b9f07a; border-color: #b9f07a88; }
.perk-loadout h3 small { color: #f0c870; }

/* Side by side (Gage 11-03): the level you own on the left, the one you picked on the right; one wide stage when they match. */
.pv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 8px; }
.pv-pair .pv-stage { margin: 0; aspect-ratio: 4 / 5; }
.pv-pair.single { grid-template-columns: 1fr; }
.pv-pair.single .pv-half { display: none; }
.pv-pair.single .pv-stage { aspect-ratio: 16 / 10; }
.pv-pair .pv-tag { font-size: 12px; padding: 2px 6px; }
.pv-yours { border-left-color: #8a7254; color: #e8dcc4; }
.pv-pair:not(.single) .pv-read { font-size: 13px; }

/* Gage 11-03: a slim, clean preview strip (gold disc, the words, your level beside the next) and the exact difference. */
.pv-btn { min-height: 48px; gap: 10px; padding: 5px 10px 5px 6px; background: linear-gradient(180deg, #2b251d, #17140f); border: 1px solid #5a4b39; border-left: 4px solid #d9b46a; box-shadow: inset 0 1px #ffffff12, 2px 3px 0 #050505; }
.pv-play { flex: 0 0 36px; width: 36px; height: 36px; background: radial-gradient(circle at 35% 30%, #ffe08a, #c9962e 72%); border: 2px solid #15120e; box-shadow: 0 2px 0 #000; }
.pv-play svg { width: 20px; height: 20px; margin-left: 2px; }
.pv-txt b { font-size: 17px; }
.pv-vs { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; font: 400 14px/1 var(--display); letter-spacing: .06em; }
.pv-vs i { font-style: normal; color: #a99c84; } .pv-vs em { font-style: normal; padding: 3px 6px 2px; color: #1a1208; background: #d9b46a; }
.pv-vs u { width: 12px; height: 2px; background: #d9b46a; position: relative; } .pv-vs u::after { content: ''; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left: 5px solid #d9b46a; border-right: 0; }
.pv-btn.compact .pv-play { flex-basis: 32px; width: 32px; height: 32px; } .pv-btn.compact .pv-txt b { font-size: 15px; }
.pv-diff-t { width: 100%; margin: 4px 0 8px; border-collapse: collapse; font-size: 13px; }
.pv-diff-t th, .pv-diff-t td { padding: 5px 6px; text-align: left; border-bottom: 1px solid #3b2c1c; }
.pv-diff-t thead th { font: 400 13px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: #a99c84; }
.pv-diff-t thead th:last-child { color: #ffd36e; }
.pv-diff-t tbody th { font-weight: 600; color: #d9cdb8; }
.pv-diff-t td { color: #cfc4ae; } .pv-diff-t tr.up td:last-child { color: #ffd36e; font-weight: 700; }

/* Every level up shows, or is pointed out (Gage 11-04: "the level up from the last one should have somewhat of a visible difference
   ... or the difference should be pointed out"). Under the two stages: the headline change, the compared level on the left, the
   picked one on the right; then every number that changes with an arrow and two bars (compared, picked) on the top level's scale;
   then what stays the same in one line. The rings and bars over the clips are drawn on the canvas (js/preview.js). */
.pv-mid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; margin: 0 0 8px; padding: 6px 8px; background: #120f0b; border: 1px solid #5a4b39; border-top: 3px solid var(--ab, #8f1d22); box-shadow: 2px 2px 0 #000; }
.pv-mid.gold { border-top-color: #d9a531; }
.pv-mid > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-mid-b { align-items: flex-end; text-align: right; }
.pv-mid small { font: 400 11px/1.05 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #a99c84; }
.pv-mid b { font: 400 21px/1.05 var(--display); letter-spacing: .02em; color: #e8dcc4; overflow-wrap: anywhere; }
.pv-mid-b small, .pv-mid-b b { color: #ffd36e; }
.pv-mid-x { align-items: center; text-align: center; }
.pv-mid-x i { max-width: 104px; font: 400 12px/1.1 var(--display); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #f2eee6; }
.pv-mid-x u, .pv-cv u { display: block; flex: none; width: 22px; height: 2px; background: #d9b46a; position: relative; }
.pv-mid-x u { width: 34px; height: 3px; }
.pv-mid-x u::after, .pv-cv u::after { content: ''; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 6px solid #d9b46a; border-right: 0; }
.pv-calls { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.pv-calls li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "b b"; align-items: center; gap: 3px 8px; padding: 4px 7px 5px; background: #17130e; border-left: 3px solid #d9b46a; }
.pv-calls li.gold { border-left-color: #ffd36e; background: linear-gradient(90deg, #2c2410, #17130e 70%); }
.pv-cl { grid-area: l; font-size: 13px; font-weight: 600; color: #d9cdb8; }
.pv-cv { grid-area: v; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 7px; font-size: 13px; text-align: right; }
.pv-cv i, .pv-cv em { font-style: normal; } .pv-cv i { color: #a99c84; } .pv-cv em { font-weight: 700; color: #ffd36e; }
.pv-cb { grid-area: b; display: grid; gap: 2px; padding: 2px; background: #0a0806; }
.pv-cb i, .pv-cb em { display: block; height: 4px; min-width: 2px; }
.pv-cb i { background: #7d6f5c; } .pv-cb em { background: #ffd36e; }
.pv-cb.gold em { background: linear-gradient(90deg, #ffe08a, #d9a531); }
.pv-same { margin: 2px 0 4px; font-size: 12px; line-height: 1.35; color: #a99c84; }
.pv-unit { margin: 0 0 6px; font-size: 11px; color: #8d8170; }
@media (max-width: 360px) { .pv-mid b { font-size: 18px; } .pv-mid-x i { max-width: 84px; } .pv-calls li, .pv-cv { font-size: 12px; } }
