#boardgame-joker-section .joker-mode-head { position: relative; padding-top: 58px; text-align: center; margin-bottom: 20px; }
.joker-custom-control { position: absolute; top: 0; left: 0; display: grid; border: 1px solid #997255; border-radius: 8px; overflow: hidden; z-index: 2; }
.joker-custom-control button { border: 0; background: #251d1b; color: #ead0b5; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 11px; }
.joker-custom-control button + button { border-top: 1px solid #694d3b; }
.joker-custom-control .is-on { background: #8d6447; color: #fff7ed; }
.joker-custom-dialog { box-sizing: border-box; width: min(880px, calc(100vw - 20px)); max-height: 92dvh; padding: 20px; border: 1px solid #987052; border-radius: 8px; background: #171214; color: #eadfd5; overflow: auto; font-family: inherit; }
.joker-custom-dialog::backdrop { background: #000b; }
.joker-custom-dialog * { box-sizing: border-box; letter-spacing: 0; }
.joker-custom-heading, .joker-custom-group header, .joker-custom-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.joker-custom-heading { position: relative; min-height: 40px; padding-right: 50px; }
.joker-custom-heading h2 { margin: 0; color: #e1b68f; font-size: 22px; }
.joker-custom-dialog button { color: inherit; font: inherit; cursor: pointer; }
.joker-custom-heading button, .joker-custom-dialog footer button { border: 1px solid #76563f; border-radius: 6px; background: #2a201e; padding: 8px 16px; }
.joker-custom-heading > button[data-close] { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; }
.joker-custom-search { display: grid; gap: 6px; margin: 18px 0 10px; font-size: 13px; }
.joker-custom-search input { width: 100%; padding: 12px; border: 1px solid #866347; border-radius: 6px; background: #241c1b; color: #fff; font: inherit; }
.joker-custom-result-head { min-height: 28px; font-size: 12px; }
.joker-custom-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 124px; margin-bottom: 12px; overflow: auto; align-content: start; border-block: 1px solid #554138; }
.joker-custom-results button { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 5px; border: 1px solid transparent; background: transparent; text-align: left; }
.joker-custom-results button[aria-pressed="true"] { border-color: #e4b68b; background: #493528; }
.joker-custom-results img { width: 38px; height: 38px; object-fit: contain; }
.joker-custom-results span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.joker-custom-results small { display: block; color: #bea999; }
.joker-custom-dialog button:disabled { opacity: .4; cursor: not-allowed; }
.joker-custom-empty { padding: 14px; grid-column: 1 / -1; }
.joker-custom-group { padding: 12px 0; border-bottom: 1px solid #554138; }
.joker-custom-group header { margin-bottom: 8px; color: #d8b18e; font-size: 13px; }
.joker-custom-group.is-joker header { color: #f1d8bc; }
.joker-custom-group header span { color: #c08472; }
.joker-custom-group header .is-valid { color: #a8cf92; }
.joker-custom-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.joker-custom-slot { position: relative; min-width: 0; padding-bottom: 30px; }
.joker-custom-card { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 360 / 500; padding: 0; overflow: hidden; border: 1px dashed #806047; border-radius: 6px; background: #281d1b center/100% 100% no-repeat; }
.joker-custom-group.is-joker .joker-custom-card { border-color: #c39b75; box-shadow: inset 0 0 12px rgba(205, 163, 127, .08); }
.joker-custom-card.is-selected { outline: 2px solid #efd0ad; outline-offset: 1px; }
.joker-custom-name { position: absolute; top: 13%; left: 12%; width: 76%; overflow: hidden; color: #201d19; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; z-index: 1; }
.joker-custom-art { position: absolute; top: 25%; left: 20%; width: 60%; height: 42%; object-fit: contain; }
.joker-custom-code { position: absolute; bottom: 15%; width: 100%; color: #201d19; font-size: 14px; font-weight: 900; text-align: center; }
.joker-custom-slot-number { color: #cda37f; font-size: 18px; font-weight: 800; }
.joker-custom-remove { position: absolute; right: 0; bottom: 0; width: 28px; height: 26px; padding: 0; border: 1px solid #8e674a; border-radius: 5px; background: #35231f; }
.joker-custom-dialog footer { padding-top: 12px; text-align: right; }
.joker-custom-dialog footer p { min-height: 38px; color: #ddcfc3; font-size: 12px; line-height: 1.6; text-align: left; }
.joker-custom-dialog [data-save]:enabled { border-color: #e1b184; background: #725039; }
@media (max-width: 540px) {
    #boardgame-joker-section .joker-mode-head { padding-top: 68px; }
    .joker-custom-dialog { padding: 12px; }
    .joker-custom-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .joker-custom-slots { gap: 4px; }
    .joker-custom-slot { padding-bottom: 27px; }
    .joker-custom-name { top: 10%; font-size: 5.5px; }
    .joker-custom-code { bottom: 13%; font-size: 7px; }
}
