/* Paper style for every card and panel (owner 2026-10-21: "change all of the cards for everything paper style",
   except the "Caught!" word over the ball (.hitword) and the catch card top right (.fxcard), which keep their look).
   The style is the ball bar's and the side rail's: kraft paper from the menu (--paper-img) with an ink rim, a dashed
   stitch inset, a flat ink drop and a soft shadow, a touch off straight; text in ink; the chosen or highlighted thing
   in solid ink with cream letters. Loaded last, so these rules win. */
#mpHud, #paoPause, #paoLoad {
  --k-ink: #2b2620; --k-cream: #f6eedb; --k-groove: #a88b5c;
  --k-bg: var(--paper-img) center / 140% 220% no-repeat, #e9d9b4;
  --k-drop: 3px 4px 0 #2b262038, 0 8px 18px #00000040;
}

/* ---- the kraft card: one rule for every card-like box ---- */
#mpHud :is(.bt-card, .bt-roster, .bt-mv, .bt-mv:nth-of-type(n), .bt-styles, .bt-wait, .bt-info, .bt-dmg, .bt-win-panel, .bt-mon, .bt-item,
  .mp-challenge, .mp-waiting, .mp-nearprompt, .enc-title, .enc-mash, .mp-enc-card, .mp-enc-balls, .mp-item, .status-chip, .mp-banner),
.popup {
  background: var(--k-bg) !important; color: var(--k-ink) !important; border: 2px solid var(--k-ink) !important;
  box-shadow: var(--k-drop) !important; text-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* the stitch, on the bigger cards (small chips stay clean) */
#mpHud :is(.bt-roster, .bt-info, .bt-win-panel, .mp-challenge, .enc-mash, .mp-enc-card)::after,
.popup::after {
  content: ''; position: absolute; inset: 5px; border: 1.5px dashed #2b262055; border-radius: inherit; pointer-events: none;
}

/* a touch off straight, as the ball bar and the rail */
#mpHud .bt-card:nth-child(odd), #mpHud .bt-mv:nth-of-type(odd) { rotate: -.6deg; }
#mpHud .bt-card:nth-child(even), #mpHud .bt-mv:nth-of-type(even) { rotate: .5deg; }
#mpHud .bt-roster, #mpHud .mp-challenge, #mpHud .enc-mash { rotate: -.8deg; }

/* ---- the highlighted / chosen thing: solid ink with cream letters ---- */
#mpHud .bt-card.on { background: var(--k-ink) !important; color: var(--k-cream) !important; }
#mpHud .bt-card.on .bt-card-ic { background: #e8c25c; color: var(--k-ink); }
#mpHud .bt .bt-card.on .bt-card-key { background: var(--k-cream) !important; color: var(--k-ink) !important; border-color: var(--k-cream) !important; }
#mpHud .bt-card.armed, #mpHud .bt-card.armed.on { background: #c8422b !important; color: var(--k-cream) !important; }
#mpHud .bt-card-ic { color: var(--k-ink); }
#mpHud .bt .bt-card-key { background: var(--k-cream) !important; color: var(--k-ink) !important; border: 1.5px solid var(--k-ink) !important; }
#mpHud .bt-mv.on, #mpHud .bt-mv.on:is(.s-strong, .s-agile) { background: linear-gradient(#2b262040, #2b262040), var(--k-bg) !important; }
#mpHud :is(.bt-mv-name, .bt-pp, .bt-mv.on .bt-pp) { color: var(--k-ink) !important; }
#mpHud .bt-mv > .bt-eff { color: #5a4a35 !important; }
#mpHud .bt-styles > .bt-style { color: var(--k-ink) !important; }
#mpHud .bt-styles > .bt-style.on, #mpHud .bt-styles > .bt-style.on:hover, #mpHud .bt-styles > .bt-style.on:is(.s-strong, .s-agile) { background: var(--k-ink) !important; color: var(--k-cream) !important; }

/* ---- the turn chain: the bar in ink with cream letters, the coins as small kraft discs keeping their rings ---- */
#mpHud .bt-order-head, #mpHud .bt[data-mode=pvp] .bt-order-head { background: var(--k-ink); color: var(--k-cream); }
#mpHud .bt .bt-order-head kbd { background: var(--k-cream) !important; color: var(--k-ink) !important; }
#mpHud .bt-ord { background: var(--paper-img) center / 700% 700% no-repeat, #e9d9b4; box-shadow: 2px 3px 0 #2b26202e, 0 4px 10px #00000047; }
#mpHud .bt-ord-face, #mpHud .bt-roster-face, #mpHud .bt-roster-face.cur, #mpHud .bt-me-face { background: var(--k-cream); }
#mpHud .bt-wait .bt-timer:before, #mpHud .bt-timer:before { background: var(--k-ink); }

/* ---- pills, grooves and small marks inside the cards, in ink ---- */
#mpHud :is(.bt-lv, .bt-meter, .bt-mon-lv) { background: var(--k-ink) !important; color: var(--k-cream) !important; }
#mpHud .bt-hp { background: var(--k-groove); box-shadow: inset 0 1px 2px #2b262066, 0 0 0 1.5px var(--k-ink); }
#mpHud .bt-roster-face { box-shadow: 0 0 0 2px var(--k-ink); }

/* ---- the world's prompts and notes ---- */
#mpHud .mp-waiting, #mpHud .mp-nearprompt { font-weight: 700; }
#mpHud .mp-waiting::before { color: var(--k-ink); }
#mpHud .mp-nearprompt small { color: #5a4a35 !important; }
#mpHud .mp-nearprompt kbd { background: var(--k-ink) !important; color: var(--k-cream) !important; }
#mpHud .banner.strip-brush { background: var(--paper-img) center / 140% 400% no-repeat, #e9d9b4; color: var(--k-ink); text-shadow: none; filter: drop-shadow(2px 3px 0 #2b26202e) drop-shadow(0 6px 12px #0000003d); }
#mpHud .mp-challenge :is(.mp-ch-kick, .mp-ch-title, .mp-ch-line, .mp-ch-hint, h3, p, small, b) { color: var(--k-ink); }
#mpHud .mp-ch-stake { background: var(--k-cream) !important; border: 1.5px solid var(--k-ink) !important; color: var(--k-ink) !important; }
#mpHud .mp-ch-go { background: var(--k-ink) !important; color: var(--k-cream) !important; box-shadow: 2px 3px 0 #2b262038; }

/* ---- the game's own tutorial cards (How to Move, Sprint, Jump) ---- */
.popup, .popup .instruction .title { color: var(--k-ink) !important; }
.popup .key { border-color: var(--k-ink) !important; color: var(--k-ink) !important; background: var(--k-cream) !important; }

/* ---- the race screen's cards and chips ---- */
#mpHud .enc-meter { background: var(--k-groove); box-shadow: inset 0 1px 2px #2b262066, 0 0 0 1.5px var(--k-ink); }
#mpHud :is(.enc-title, .enc-mash, .mp-enc-card) :is(b, span, small, p, h2, h3) { color: inherit; }

/* ---- strips cut like the cash-out paper at the top (owner 2026-10-21): the same paper picture (money-strip.webp)
   stretched to the strip, its own ragged edges and shape, no torn mask, a soft drop; ink text ---- */
#mpHud :is(.banner.strip-brush, .mp-waiting, .mp-nearprompt, .bt-text) {
  background: url(/game/client/pao/img/money-strip.webp) center / 100% 100% no-repeat !important;
  -webkit-mask: none !important; mask: none !important; border: none !important; border-radius: 0 !important;
  box-shadow: none !important; filter: drop-shadow(0 2px 4px #00000066) !important; color: var(--k-ink) !important; text-shadow: none !important;
}
#mpHud .banner.strip-brush { padding: .85em 2.6em .95em; }
#mpHud :is(.mp-waiting, .mp-nearprompt) { padding-left: 2.2em; padding-right: 2.2em; }
#mpHud .bt-text { padding-left: 34px; padding-right: 34px; rotate: 0deg; }
#mpHud .bt-text::after { display: none; }

/* ---- the toasts ("Aim first...") as the "Caught!" word (owner 2026-10-21): cream letters on a dark brush stroke ---- */
#mpHud .toast.strip-brush {
  background: none !important; -webkit-mask: none !important; mask: none !important; filter: none !important;
  color: var(--cream-ink, #f3edd3) !important; text-shadow: var(--hit-shadow, 0 2px 6px #0000008c) !important;
  isolation: isolate; position: relative; padding: 8px 34px 10px 26px; font-size: 15px; font-weight: 500;
}
#mpHud .toast.strip-brush::after {
  content: ""; z-index: -1; position: absolute; inset: -2px -6px; background: #10100ecc;
  -webkit-mask: var(--brush) 0 0 / 100% 100% no-repeat; mask: var(--brush) 0 0 / 100% 100% no-repeat;
}
#mpHud .toast.strip-brush::before { background: var(--cream-85, #f3edd3d9); }

/* the STYLE label on the style strip, in ink (it was a pale grey on the kraft) */
#mpHud .bt-styles :is(.bt-sty-lbl, .bt-styles-lbl, small, span:first-child) { color: #5a4a35 !important; }
