/*
 * Zakkenrollen en Inbraak (15-11-2026): het scherm met kop en tellers, de banner, de ervaringsbalk, de strook boven de
 * rijen, de rijen met voorbijgangers of huizen en de uitslagstrook op de plek van de rij. Overgenomen uit v2
 * (misdaad-klus.css en klusjes2.css), maar met de kleuren van v1 (--color-*), zodat Klassiek, OG klassiek en grey
 * vanzelf meedoen. Met de hand geschreven, los van de Tailwind-build.
 */

.ms-tabs { grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
.ms-tab-terug { padding: 0 12px; }
.ms-tab-terug .crime-tab-icon { display: block; color: var(--color-faint); }
.ms-tab-terug:hover .crime-tab-icon { color: var(--color-ink); }
a.crime-tab { text-decoration: none; }

.ms { overflow: hidden; padding-bottom: 12px; }
.ms .tabular { font-variant-numeric: tabular-nums; }
.ms-kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; }
.ms-kop h2 { margin: 0; }
.ms-tellers { display: flex; align-items: center; gap: 12px; margin: 0; }
.ms-tellers span { display: inline-flex; align-items: center; gap: 5px; }
.ms-tellers .icon { width: 14px; height: 14px; }
.ms-tellers b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ms-tellers .is-ok { color: var(--color-success); }
.ms-tellers .is-stil { color: var(--color-faint); }
.ms-tellers .is-bad { color: var(--color-danger); }

.ms-banner { position: relative; height: 120px; background: #000; overflow: hidden; }
.ms-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.ms-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0000 40%, #000b); pointer-events: none; }
.ms-banner-chip { position: absolute; left: 14px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; max-width: calc(50% - 20px); height: 24px; padding: 0 10px; border-radius: 12px; background: #000a; color: #fff; font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-banner-chip.is-rechts { left: auto; right: 14px; }
.ms-banner-chip .icon { width: 12px; height: 12px; flex: none; }

.ms-ervaring { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 16px; background: color-mix(in srgb, var(--color-ink) 4%, transparent); color: var(--color-muted); font-size: 12px; }
.ms-ervaring b { color: var(--color-ink); }
.ms-ervaring .bar { width: 110px; }
.ms-ervaring-bonus { color: var(--color-success); font-weight: 600; }
.ms-ervaring-stat { margin-left: auto; color: var(--color-faint); }

.ms-wacht { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 12px 0; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--color-warning) 9%, transparent); font-size: 13px; color: var(--color-muted); }
.ms-wacht p { flex: 1 1 200px; margin: 0; }
.ms-wacht b { font-size: 15px; margin-right: 4px; }

.ms-strook { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 12px 0; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--color-ink) 4%, transparent); color: var(--color-muted); font-size: 12.5px; }
.ms-strook b { color: var(--color-ink); font-variant-numeric: tabular-nums; }
.ms-strook .icon { width: 13px; height: 13px; vertical-align: -2px; flex: none; }
.ms-strook.is-uitslag, .ms-strook.is-code { display: block; padding: 0; background: none; }
.ms-strook.is-info { flex-wrap: nowrap; align-items: flex-start; }
.ms-strook.is-info .icon { margin-top: 2px; }
.ms-namen { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; }

/* ---------------------------------------------------------------- rijen */
.ms-rijen { display: grid; gap: 6px; margin: 12px 12px 0; padding: 0; list-style: none; }
.ms-rij { position: relative; min-width: 0; border: 1px solid var(--color-line); border-radius: 8px; background: var(--color-card-deep); overflow: hidden; }
.ms-rij.is-op-slot { opacity: .75; }
.ms-rij-rij { display: grid; align-items: stretch; min-height: 60px; }
.ms-rij-rij.is-zak { grid-template-columns: 92px minmax(0, 1fr) 84px 72px 128px; grid-template-areas: "foto naam weg kans actie"; }
.ms-rij-rij.is-huis { grid-template-columns: 92px minmax(0, 1fr) 72px 236px; grid-template-areas: "foto naam kans actie"; }
.ms-foto { grid-area: foto; position: relative; display: block; width: 92px; min-height: 60px; overflow: hidden; }
.ms-foto img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.ms-foto-slot { position: absolute; inset: 0; display: grid; place-items: center; background: #000a; color: #fff; }
.ms-naam { grid-area: naam; align-self: center; min-width: 0; margin: 6px 12px 6px 14px; }
.ms-naam h3 { margin: 0; font-weight: 700; font-size: 14.5px; line-height: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 2px 0 0; color: var(--color-faint); font-size: 11.5px; line-height: 15px; }
.ms-sub .is-geld { color: var(--color-money); font-variant-numeric: tabular-nums; }
.ms-sub .icon { width: 11px; height: 11px; vertical-align: -1px; }
.ms-tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ms-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ms-tag.is-ok, .ms-bezig.is-ok { color: var(--color-success); }
.ms-tag.is-warn { color: var(--color-warning); }
.ms-tag.is-bad, .ms-bezig.is-bad { color: var(--color-danger); }
.ms-bezig { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ms-bezig.is-stil { color: var(--color-muted); }

.ms-weg, .ms-kans { position: relative; display: grid; align-content: center; justify-items: center; gap: 2px; padding: 0 8px; }
.ms-weg { grid-area: weg; }
.ms-kans { grid-area: kans; }
.ms-weg::before, .ms-kans::before, .ms-actie::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--color-line); }
.ms-weg-lab { color: var(--color-faint); font-size: 10px; line-height: 11px; }
.ms-weg-klok { font-size: 13.5px; line-height: 16px; }
.ms-weg-klok.is-bijna { color: var(--color-danger); }
.ms-weg-balk { display: block; width: 100%; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--color-ink) 10%, transparent); overflow: hidden; }
.ms-weg-balk i { display: block; height: 100%; border-radius: 2px; background: hsl(var(--h, 120) 52% 48%); transition: width 1s linear, background-color 1s linear; }
.ms-kans b { font-size: 20px; line-height: 22px; font-weight: 700; }
.ms-kans b.is-ok { color: var(--color-success); }
.ms-kans b.is-warn { color: var(--color-warning); }
.ms-kans b.is-bad { color: var(--color-danger); }
.ms-kans small { color: var(--color-faint); font-size: 10.5px; line-height: 12px; white-space: nowrap; }

.ms-actie { grid-area: actie; position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 10px 8px 12px; }
.ms-knop { min-width: 92px; justify-content: center; white-space: nowrap; }
.ms-knop-tekst { display: inline-flex; align-items: center; gap: 6px; }
.ms-knop-wacht { display: none; }
.ms-knop.is-wacht .ms-knop-tekst { display: none; }
.ms-knop.is-wacht .ms-knop-wacht { display: inline; }
.ms-knop.is-wacht, .ms-knop.is-wacht:hover { opacity: 1; cursor: not-allowed; background: color-mix(in srgb, var(--color-ink) 6%, transparent); border: 1px solid var(--color-line); color: var(--color-muted); box-shadow: none; }
.ms-dicht { display: inline-flex; align-items: center; gap: 5px; color: var(--color-faint); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ms-dicht.is-klaar { color: var(--color-success); }
.ms-dicht .icon { width: 13px; height: 13px; }

.ms-leeg { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 18px; color: var(--color-faint); font-size: 13px; }
.ms-rij.is-leeg { border-style: dashed; background: none; }
.ms-voet { display: flex; align-items: center; gap: 8px; margin: 10px 14px 0; color: var(--color-faint); font-size: 12px; }

/* Voorbijgangers komen en gaan. */
.ms-rij[data-zk-rij] { transition: opacity .3s ease, transform .3s ease, max-height .35s ease .1s, margin .35s ease .1s; max-height: 260px; }
.ms-rij.is-weg { opacity: 0; transform: translateX(24px); max-height: 0; margin-top: -6px; pointer-events: none; }
.ms-rij.is-nieuw { animation: ms-nieuw .4s ease-out; }
@keyframes ms-nieuw { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------------------------------------------------------- uitslag op de plek van de rij */
.ms-uitslag { --ms-toon: var(--color-success); display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 14px 10px 12px; border-top: 1px solid color-mix(in srgb, var(--ms-toon) 35%, transparent); background: color-mix(in srgb, var(--ms-toon) 9%, transparent); animation: ms-open .26s ease-out; }
.ms-uitslag.is-escaped { --ms-toon: var(--color-warning); }
.ms-uitslag.is-caught { --ms-toon: var(--color-danger); }
.ms-uitslag.is-acc { --ms-toon: var(--color-accent); }
.ms-uitslag.is-los, .ms-rij.is-uitslag-plek .ms-uitslag { border: 1px solid color-mix(in srgb, var(--ms-toon) 35%, transparent); border-radius: 8px; }
.ms-rij.is-uitslag-plek { border: 0; background: none; animation: ms-nieuw .3s ease-out; }
.ms-uitslag-teken { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ms-toon); background: color-mix(in srgb, var(--ms-toon) 16%, transparent); animation: ms-spring .3s .1s ease-out both; }
.ms-uitslag.is-escaped .ms-uitslag-teken, .ms-uitslag.is-caught .ms-uitslag-teken { animation-name: ms-schud; }
.ms-uitslag-midden { min-width: 0; }
.ms-uitslag-kop { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 12px; color: var(--color-faint); min-width: 0; }
.ms-uitslag-kop b { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ms-toon); }
.ms-uitslag.is-acc .ms-uitslag-kop b { color: var(--color-ink); text-transform: none; letter-spacing: 0; }
.ms-uitslag-kop span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-uitslag-tekst { margin: 2px 0 0; font-size: 12.5px; color: var(--color-muted); line-height: 1.4; }
.ms-uitslag-tekst em { font-style: normal; color: var(--color-ink); }
.ms-uitslag-geld { font-size: 18px; font-weight: 700; color: var(--color-money); white-space: nowrap; }
@keyframes ms-open { from { opacity: 0; transform: translateY(-4px); } }
@keyframes ms-spring { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } }
@keyframes ms-schud { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ms-wegklap { transition: height .35s ease, opacity .25s ease, margin .35s ease; opacity: 0; margin-top: 0 !important; margin-bottom: 0 !important; border-width: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .ms-rij[data-zk-rij], .ms-weg-balk i, .ms-wegklap { transition: none; }
  .ms-rij.is-nieuw, .ms-rij.is-uitslag-plek, .ms-uitslag, .ms-uitslag-teken { animation: none; }
}

/* ---------------------------------------------------------------- overzicht (/misdaad) */
.mh { overflow: hidden; padding-bottom: 12px; }
.mh .tabular { font-variant-numeric: tabular-nums; }
.mh-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.mh-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; background: color-mix(in srgb, var(--color-ink) 6%, transparent); color: var(--color-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mh-chip .icon { width: 13px; height: 13px; }
.mh-chip.is-ok { background: color-mix(in srgb, var(--color-success) 12%, transparent); color: var(--color-success); }

.mh-kaarten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 12px; padding: 0; list-style: none; }
.mh-kaart { min-width: 0; }
.mh-link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--color-line); border-radius: 8px; background: var(--color-card-deep); color: inherit; text-decoration: none; overflow: hidden; transition: border-color .15s, transform .15s; }
.mh-link:hover { border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-line)); }
.mh-link:hover .mh-foto img { transform: scale(1.04); }
.mh-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.mh-foto { position: relative; display: block; height: 150px; background: #000; overflow: hidden; }
.mh-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.mh-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0000 45%, #000a); pointer-events: none; }
.mh-wacht { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.mh-pil { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: #000b; color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.mh-pil b { font-weight: 700; }
.mh-pil .icon { width: 12px; height: 12px; flex: none; }
.mh-pil i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mh-pil.is-klaar { color: #6ee7a0; }
.mh-pil.is-wacht { color: #fcd34d; }
.mh-pil.is-slot { color: #d4d4d8; }
.mh-pil.is-klaar b, .mh-pil.is-wacht b, .mh-pil.is-slot b { color: #fff; }
.mh-tekst { display: flex; flex-direction: column; gap: 2px; flex: 1; padding: 10px 12px 8px; min-width: 0; }
.mh-naam { font-size: 15px; font-weight: 800; line-height: 19px; text-transform: uppercase; letter-spacing: .02em; color: var(--color-ink); }
.mh-soort { color: var(--color-faint); font-size: 11.5px; line-height: 15px; }
.mh-regel { margin-top: 3px; color: var(--color-success); font-size: 12.5px; line-height: 17px; font-weight: 600; }
.mh-onder { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px 0 12px; border-top: 1px solid var(--color-line); color: var(--color-muted); font-size: 12px; }
.mh-onder b { color: var(--color-ink); }
.mh-stat { white-space: nowrap; }
.mh-balk { flex: 1; min-width: 30px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--color-ink) 10%, transparent); overflow: hidden; }
.mh-balk i { display: block; height: 100%; border-radius: 2px; background: var(--color-brass, var(--color-accent)); }
.mh-bonus { color: var(--color-success); font-weight: 600; white-space: nowrap; }
.mh-teller { display: inline-flex; align-items: center; gap: 4px; }
.mh-teller .icon { width: 13px; height: 13px; }
.mh-teller.is-ok { color: var(--color-success); }
.mh-teller.is-stil { color: var(--color-faint); }
.mh-teller.is-bad { color: var(--color-danger); }
.mh-teller b { color: inherit; font-variant-numeric: tabular-nums; }
.mh-pijl { width: 16px; height: 16px; margin-left: auto; flex: none; color: var(--color-faint); transition: transform .15s, color .15s; }
.mh-link:hover .mh-pijl { color: var(--color-accent); transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
  .mh-link, .mh-foto img, .mh-pijl { transition: none; }
  .mh-link:hover .mh-foto img { transform: none; }
}

/* ---------------------------------------------------------------- tablet en telefoon */
@media (max-width: 1099.98px) {
  .mh-kaarten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-rij-rij.is-huis { grid-template-columns: 92px minmax(0, 1fr) 72px; grid-template-areas: "foto naam kans" "actie actie actie"; }
  .ms-rij-rij.is-huis .ms-actie { justify-content: flex-end; padding-top: 0; }
  .ms-rij-rij.is-huis .ms-actie::before { display: none; }
}
@media (max-width: 767.98px) {
  .ms-kop { padding: 0 12px; min-height: 46px; }
  .ms-banner { height: 84px; }
  .ms-banner-chip { max-width: calc(100% - 28px); }
  .ms-banner-chip.is-rechts { display: none; }
  .ms-ervaring { padding: 8px 12px; }
  .ms-ervaring-stat { margin-left: 0; width: 100%; }
  .ms-rijen, .ms-strook, .ms-wacht { margin-left: 8px; margin-right: 8px; }
  .ms-tabs .ms-tab-klaar { display: none; }
  .ms-tab-terug { padding: 0 9px; }
  /* Vier tabbladen passen niet naast elkaar: twee rijen, Overzicht links over beide rijen. */
  .ms-tabs { grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
  .ms-tab-terug { grid-row: span 2; }
  .ms-tab-terug .crime-tab-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mh-kaarten { grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 8px; }
  .mh-foto { height: 88px; }
  .mh-chip { height: 22px; font-size: 11.5px; }
  .ms-tabs .crime-tab-pill.is-ready { padding: 0 5px; }
  .ms-rij-rij.is-zak { grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-areas: "foto naam naam" "weg kans actie"; }
  .ms-rij-rij.is-huis { grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-areas: "foto naam naam" "actie actie kans"; }
  .ms-foto { width: 76px; min-height: 64px; }
  .ms-naam { margin: 6px 10px; }
  .ms-naam h3 { white-space: normal; font-size: 14px; }
  .ms-weg::before, .ms-kans::before, .ms-actie::before { display: none; }
  .ms-rij-rij.is-zak .ms-weg { justify-items: start; padding: 8px 0 10px 12px; }
  .ms-rij-rij.is-zak .ms-kans { padding-top: 8px; }
  .ms-rij-rij.is-zak .ms-actie { padding-top: 8px !important; }
  .ms-rij-rij.is-zak .ms-weg-balk { width: 64px; }
  .ms-rij-rij.is-zak .ms-kans { padding-bottom: 10px; }
  .ms-rij-rij.is-zak .ms-actie { padding: 0 10px 10px 0; }
  .ms-rij-rij.is-huis .ms-actie { justify-content: flex-start; padding: 0 0 10px 10px; flex-wrap: wrap; }
  .ms-rij-rij.is-huis .ms-kans { padding-bottom: 10px; }
  .ms-knop { min-width: 0; }
  .ms-uitslag { grid-template-columns: 28px minmax(0, 1fr); }
  .ms-uitslag-geld { grid-column: 2; font-size: 16px; }
}

/* Op straat (15-11): wie net binnenkomt, schuift er zichtbaar bij en licht even op. */
.ms-namen .player-name.ms-binnen { animation: ms-binnen 4s ease-out; border-radius: 4px; }
@keyframes ms-binnen {
  0% { opacity: 0; transform: translateY(-4px); background: #6a90f640; box-shadow: 0 0 0 3px #6a90f640; }
  15% { opacity: 1; transform: none; }
  100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) { .ms-namen .player-name.ms-binnen { animation: none; outline: 1px solid #6a90f6; } }
.crime-tabs[hidden] { display: none; }
