/* Additive sandbox presentation. Campaign, roster, shop, and original guides
   are unaffected because every selector is scoped to a sandbox class. */
.sandbox-lobby {
  --sandbox-ink: #234c38;
  --sandbox-gold: #a17b30;
  --sandbox-border: #d6c8a7;
  color: #283c30;
}
.sandbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.sandbox-heading > div { min-width: 0; }
.sandbox-heading h2 { margin: 0; font: 700 clamp(30px, 3.8vw, 48px)/1.12 Georgia, serif; letter-spacing: -1px; }
.sandbox-heading p:not(.sandbox-kicker) { margin: 10px 0 0; color: #66634f; line-height: 1.6; }
.sandbox-kicker { margin: 0 0 9px; color: #8b6b2c; font: 700 11px/1.5 Arial, sans-serif; letter-spacing: 2.5px; text-transform: uppercase; }
.sandbox-heading > button { flex: 0 0 auto; }
.sandbox-map { position: relative; min-height: 265px; overflow: hidden; isolation: isolate; border: 1px solid #b19a62; border-radius: 15px; margin-bottom: 25px; background: #64735b; box-shadow: 0 5px 18px #374d2620; }
.sandbox-map > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.sandbox-map::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #153a2de8, #153a2dbd 40%, #153a2d08 90%); }
.sandbox-map-copy { max-width: 650px; padding: 31px 34px; color: #fff8df; }
.sandbox-map-label { font: 700 10px/1.6 Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: #ecd79e; }
.sandbox-map-copy h3 { margin: 12px 0 9px; font: 700 clamp(35px, 4vw, 53px)/1.05 Georgia, serif; color: inherit; }
.sandbox-map-copy p { max-width: 400px; margin: 0; color: #f1ecd9; font: 17px/1.5 Georgia, serif; }
.sandbox-map-facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.sandbox-map-facts span { border: 1px solid #d9d7b866; border-radius: 20px; padding: 6px 10px; background: #193e2d85; font-size: 10px; font-weight: 700; }
.sandbox-panel { margin: 0 0 24px; padding: 25px; border: 1px solid var(--sandbox-border); border-radius: 13px; background: #fff9ebf5; box-shadow: 0 3px 0 #bca77312; }
.sandbox-step-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.sandbox-step { flex: 0 0 34px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #c5a760; border-radius: 50%; color: #795719; background: #f3e1ac; font: 700 20px/1 Georgia, serif; }
.sandbox-step-heading h3 { margin: 0 0 6px; color: var(--sandbox-ink); font: 700 25px/1.1 Georgia, serif; }
.sandbox-step-heading p { margin: 0; color: #68614e; font-size: 13px; line-height: 1.6; }
.sandbox-track-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.sandbox-track { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 19px; border: 2px solid #d4c8a8; border-radius: 10px; background: #fcf6e8; color: #354934; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.sandbox-track:hover { border-color: #9c985f; background: #f6f0dc; }
.sandbox-track.is-selected { border-color: #375c3d; background: linear-gradient(130deg, #e6edd6, #f8f6e5); box-shadow: inset 0 0 0 2px #fffdf1; }
.sandbox-track-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sandbox-track-label { font: 700 22px/1.2 Georgia, serif; }
.sandbox-track-check { flex: 0 0 24px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 18px; }
.sandbox-track.is-selected .sandbox-track-check { background: #345b3e; color: #fff9d7; font-size: 15px; }
.sandbox-track-description { color: #5c6653; font-size: 13px; line-height: 1.55; }
.sandbox-track-count { margin-top: auto; padding-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .2px; color: #705d30; }
.sandbox-pool-note { margin: 16px 0 10px; max-width: 880px; color: #585b45; font-size: 13px; line-height: 1.65; }
.sandbox-text-button { padding: 7px 0; border: 0; background: transparent; color: #29563b; font: 700 13px/1.5 Arial, sans-serif; text-align: left; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.sandbox-team { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.sandbox-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 168px; padding: 12px 7px 8px; border: 2px solid #d8c9a5; border-radius: 9px; color: #37462e; background: #f6efdd; text-align: center; cursor: pointer; }
.sandbox-slot:hover { background: #f0e8d0; border-color: #a4925d; }
.sandbox-slot.is-active { background: #eaf0d8; border-color: #365c3e; box-shadow: inset 0 0 0 2px #fffdf1; }
.sandbox-slot-number { position: absolute; top: 6px; left: 7px; display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #c3af78; border-radius: 50%; color: #78602c; background: #fff9e8; font: 700 11px/1 Arial, sans-serif; }
.sandbox-slot.is-active .sandbox-slot-number { background: #365c3e; color: #fff9df; border-color: #365c3e; }
.sandbox-slot img { width: 64px; height: 64px; object-fit: contain; }
.sandbox-slot-name { display: block; margin-top: 3px; font: 700 14px/1.25 Georgia, serif; overflow-wrap: anywhere; }
.sandbox-slot small { margin: 2px 0 5px; color: #6d7056; font: 10px/1.3 Arial, sans-serif; }
.sandbox-slot-action { margin-top: auto; color: #6c704f; font: 10px/1.3 Arial, sans-serif; }
.sandbox-slot.is-active .sandbox-slot-action { color: #305b3b; font-weight: 700; }
.sandbox-empty-slot { display: grid; place-items: center; width: 64px; height: 64px; color: #928158; font: 34px/1 Georgia, serif; }
.sandbox-team-hint { margin: 13px 0 20px; font-size: 12px; line-height: 1.65; color: #686450; }
.sandbox-team-hint strong { color: #2e5237; }
.sandbox-team-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 16px 0; }
.sandbox-team-toolbar .sandbox-team-hint { max-width: 620px; margin: 0; }
.sandbox-roster-tools { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; padding-top: 18px; border-top: 1px solid #ded2b3; }
.sandbox-roster-tools label { display: flex; flex: 1 1 250px; flex-direction: column; gap: 7px; max-width: 390px; color: #536044; font-size: 11px; font-weight: 700; }
.sandbox-roster-tools input { box-sizing: border-box; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #c9b994; border-radius: 6px; background: #fffdf3; color: #243f2f; font: 14px/1.3 Arial, sans-serif; }
.sandbox-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.sandbox-filter { min-height: 42px; padding: 9px 13px; border: 1px solid #cbbd9d; border-radius: 6px; background: #f7f1e1; color: #59634b; font: 700 12px/1.3 Arial, sans-serif; cursor: pointer; }
.sandbox-filter.is-selected { color: #fff8df; background: #37563c; border-color: #37563c; }
.sandbox-character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.sandbox-character { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 12px 11px 11px; border: 1px solid #d8caaa; border-radius: 9px; background: linear-gradient(#fffaf0, #f8f0dc); text-align: center; }
.sandbox-character-heading { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 34px; }
.sandbox-edition { font: 700 9px/1.2 Arial, sans-serif; color: #8e7134; text-transform: uppercase; letter-spacing: .7px; }
.sandbox-faction-tag { font: 9px/1.1 Arial, sans-serif; color: #78806a; }
.sandbox-portrait { width: 76px; height: 76px; object-fit: contain; margin: 5px 0 7px; }
.sandbox-character h4 { margin: 0; color: #2f4934; font: 700 17px/1.2 Georgia, serif; overflow-wrap: anywhere; }
.sandbox-character-role { margin: 5px 0 8px; color: #6c6b55; font: 11px/1.4 Arial, sans-serif; }
.sandbox-character-power { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin: auto 0 12px; padding-top: 4px; color: #71613e; font: 700 10px/1.3 Arial, sans-serif; }
.sandbox-character-power abbr { text-decoration: none; }
.sandbox-equip { width: 100%; min-height: 38px; padding: 8px 5px; border: 1px solid #9c864d; border-radius: 5px; color: #344b31; background: #efdb9b; font: 700 11px/1.3 Arial, sans-serif; cursor: pointer; }
.sandbox-equip:hover:not(:disabled) { background: #e9cf80; }
.sandbox-equip:disabled { opacity: 1; color: #506441; background: #e9edd9; border-color: #b8c39e; cursor: default; }
.sandbox-tier-4 { border-color: #ba9b4a; background: linear-gradient(#fff7db, #f5e7bd); }
.sandbox-empty { grid-column: 1/-1; margin: 0; padding: 30px 15px; color: #62694e; text-align: center; font: 15px/1.6 Georgia, serif; }
.sandbox-launch { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 26px; border: 1px solid #7a905e; border-radius: 12px; background: #e8edda; }
.sandbox-launch h3 { margin: 0 0 8px; color: #2c4e34; font: 700 25px/1.15 Georgia, serif; }
.sandbox-launch p { max-width: 650px; margin: 0 0 9px; color: #526448; font: 14px/1.6 Georgia, serif; }
.sandbox-launch small { color: #6d7358; font: 11px/1.5 Arial, sans-serif; }
.sandbox-start { flex: 0 0 auto; min-height: 50px; font-size: 15px; }
.sandbox-lobby button:focus-visible, .sandbox-lobby input:focus-visible, .sandbox-battle button:focus-visible { outline: 3px solid #2a6147; outline-offset: 4px; }
.sandbox-target { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.sandbox-battle-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.sandbox-battle-note { margin: -2px 0 17px; color: #6b664f; font-size: 12px; line-height: 1.5; }
.sandbox-shield progress { accent-color: #609ca1; }
.sandbox-shield b:last-child { font-size: 22px; line-height: .8; }
.sandbox-result .result-hero { grid-template-rows: 1fr; margin-bottom: 20px; }
.sandbox-result .result-max { grid-area: 1/1; }
.sandbox-result .result-intro { grid-area: 1/2; }
.sandbox-result .result-title { font-size: clamp(47px, 6.5vw, 86px); letter-spacing: -3px; }
.sandbox-result-label { display: block; margin: 0 0 10px; color: #837035; font: 700 10px/1.5 Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.sandbox-result-record { display: inline-block; margin-top: 17px; padding: 6px 15px; border: 1px solid #b5be8a; border-radius: 20px; background: #e9edcf; color: #49643e; font: 700 12px/1.4 Arial, sans-serif; }
.sandbox-result-metrics .result-metric { min-height: 94px; }
.sandbox-result-metrics .result-metric dd { font-size: clamp(25px, 3vw, 39px); overflow-wrap: anywhere; white-space: normal; }
.sandbox-new-achievements { margin: 0 0 24px; padding: 17px 19px; border: 1px solid #c5ab65; border-radius: 8px; background: #f8e8b3; text-align: left; }
.sandbox-new-achievements h3 { margin: 0 0 11px; color: #5c5b30; font: 700 21px/1.2 Georgia, serif; }
.sandbox-new-achievements ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; padding: 0; list-style: none; }
.sandbox-new-achievements li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.sandbox-new-achievements li > span { color: #a17a23; font-size: 19px; }
.sandbox-new-achievements strong { color: #3f5736; font: 700 15px/1.3 Georgia, serif; }
.sandbox-new-achievements p { margin: 3px 0 0; color: #6b6546; font: 11px/1.5 Arial, sans-serif; }

@media (max-width: 900px) {
  .sandbox-heading { gap: 16px; }
  .sandbox-panel { padding: 20px; }
  .sandbox-track { padding: 15px; }
  .sandbox-track-label { font-size: 20px; }
  .sandbox-team { gap: 6px; }
  .sandbox-slot { padding-inline: 4px; }
  .sandbox-slot-name { font-size: 12px; }
  .sandbox-slot-action { font-size: 9px; }
  .sandbox-roster-tools { flex-wrap: wrap; align-items: center; }
  .sandbox-team-toolbar { flex-direction: column; align-items: stretch; gap: 13px; }
  .sandbox-team-toolbar .sandbox-start { align-self: flex-start; }
  .sandbox-launch { flex-direction: column; align-items: stretch; gap: 18px; }
  .sandbox-start { align-self: flex-start; }
}
@media (max-width: 640px) {
  .sandbox-heading { align-items: flex-start; flex-direction: column; }
  .sandbox-heading h2 { font-size: 32px; }
  .sandbox-heading p:not(.sandbox-kicker) { font-size: 13px; }
  .sandbox-map { min-height: 280px; }
  .sandbox-map-copy { padding: 26px 22px; }
  .sandbox-map::after { background: linear-gradient(90deg, #163b2ee8, #17392c99); }
  .sandbox-map-copy h3 { font-size: 39px; }
  .sandbox-map-copy p { font-size: 16px; }
  .sandbox-panel { padding: 17px 13px; }
  .sandbox-step-heading { gap: 10px; }
  .sandbox-step-heading h3 { font-size: 23px; }
  .sandbox-track-options { grid-template-columns: 1fr; }
  .sandbox-track { padding: 14px; }
  .sandbox-team { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sandbox-slot { min-height: 160px; }
  .sandbox-slot-name { font-size: 14px; }
  .sandbox-slot-action { font-size: 10px; }
  .sandbox-roster-tools { gap: 13px; }
  .sandbox-roster-tools label { max-width: none; }
  .sandbox-character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sandbox-character { padding: 10px 7px 8px; }
  .sandbox-character h4 { font-size: 15px; }
  .sandbox-character-power { font-size: 9px; gap: 4px 5px; }
  .sandbox-equip { font-size: 10px; min-height: 40px; }
  .sandbox-launch { padding: 21px 17px; }
  .sandbox-launch h3 { font-size: 23px; }
  .sandbox-start { align-self: stretch; }
  .sandbox-team-toolbar .sandbox-start { align-self: stretch; }
  .sandbox-battle .battle-head { flex-wrap: wrap; gap: 12px; }
  .sandbox-battle-actions { justify-content: flex-start; }
  .sandbox-battle-actions .button { min-height: 38px; }
  .sandbox-battle-note { margin-top: 5px; font-size: 11px; }
  .sandbox-result .result-hero { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .sandbox-result .result-intro { grid-area: 1/1; }
  .sandbox-result .result-max { grid-area: 2/1; justify-self: center; margin-top: 8px; }
  .sandbox-result .result-title { font-size: clamp(43px, 10vw, 66px); letter-spacing: -2px; }
  .sandbox-result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sandbox-result-metrics .result-metric { min-height: 80px; }
  .sandbox-result-metrics .result-metric dd { font-size: 29px; }
  .sandbox-new-achievements { padding: 14px; }
  .sandbox-new-achievements ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sandbox-track { transition: none; }
}
@media (forced-colors: active) {
  .sandbox-map, .sandbox-panel, .sandbox-track, .sandbox-slot, .sandbox-character, .sandbox-launch, .sandbox-new-achievements { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  .sandbox-map::after { background: Canvas; }
  .sandbox-map-copy, .sandbox-map-copy h3, .sandbox-map-copy p, .sandbox-map-label { color: CanvasText; }
  .sandbox-track.is-selected, .sandbox-slot.is-active { border-color: Highlight; outline: 2px solid Highlight; }
  .sandbox-filter.is-selected { color: HighlightText; background: Highlight; }
  .sandbox-map-facts span, .sandbox-result-record { color: CanvasText; background: Canvas; border-color: CanvasText; }
}
@media print {
  .sandbox-lobby .sandbox-map, .sandbox-lobby .sandbox-roster-tools, .sandbox-lobby .sandbox-launch, .sandbox-lobby .sandbox-equip { display: none; }
  .sandbox-panel { break-inside: avoid; box-shadow: none; }
}
