#boardgame-stella-section .stella-title-row { padding-top: 54px; }
#boardgame-stella-section .stella-entry-toggle { top: auto; bottom: 0; transform: none; }
.stella-custom-control { position: absolute; top: 0; left: 0; display: grid; border: 1px solid #7567a6; border-radius: 8px; overflow: hidden; z-index: 2; }
.stella-custom-control button { border: 0; background: #17172a; color: #d8cdf5; padding: 7px 11px; cursor: pointer; font: inherit; font-size: 10px; }
.stella-custom-control button + button { border-top: 1px solid #514875; }
.stella-custom-control .is-on { background: #5e4d92; color: #fff6cb; }
.stella-custom-dialog { box-sizing: border-box; width: min(940px, calc(100vw - 20px)); max-height: 92dvh; padding: 20px; border: 1px solid #7165a4; border-radius: 8px; background: #0e1222; color: #e9e5f4; overflow: auto; font-family: inherit; }
.stella-custom-dialog::backdrop { background: #02040dcc; }
.stella-custom-dialog * { box-sizing: border-box; letter-spacing: 0; }
.stella-custom-heading, .stella-custom-result-head, .stella-custom-deck-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stella-custom-heading { position: relative; min-height: 40px; padding-right: 50px; }
.stella-custom-heading h2 { margin: 0; color: #f1d978; font-size: 22px; }
.stella-custom-dialog button { color: inherit; font: inherit; cursor: pointer; }
.stella-custom-heading button, .stella-custom-dialog footer button { border: 1px solid #7165a4; border-radius: 6px; background: #1b1b35; padding: 8px 16px; }
.stella-custom-heading > button[data-close] { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; }
.stella-custom-search { display: grid; gap: 6px; margin: 18px 0 10px; font-size: 13px; }
.stella-custom-search input { width: 100%; padding: 12px; border: 1px solid #665b94; border-radius: 6px; background: #15182b; color: #fff; font: inherit; }
.stella-custom-result-head { min-height: 28px; font-size: 12px; }
.stella-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 #343855; }
.stella-custom-results button { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 5px; border: 1px solid transparent; background: transparent; text-align: left; }
.stella-custom-results button[aria-pressed="true"] { border-color: #ead26f; background: #363253; }
.stella-custom-results img { width: 38px; height: 38px; object-fit: contain; }
.stella-custom-results span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.stella-custom-results small { display: block; color: #aaa3c7; }
.stella-custom-dialog button:disabled { opacity: .4; cursor: not-allowed; }
.stella-custom-empty { padding: 14px; grid-column: 1 / -1; }
.stella-custom-deck-head { margin: 10px 0; color: #e8d779; font-size: 13px; }
.stella-custom-deck-head [data-zero-limit] { color: #aeb8e9; }
.stella-custom-deck-head [data-zero-limit].is-over { color: #ff7d8a; }
.stella-custom-slots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.stella-custom-slot { position: relative; min-width: 0; padding-bottom: 25px; }
.stella-custom-card { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 360 / 500; padding: 0; overflow: hidden; border: 1px dashed #625a89; border-radius: 5px; background: #15192e url('../../../boardgame/stella/stella-card.webp') center/100% 100% no-repeat; }
.stella-custom-card.is-selected { outline: 2px solid #f0d96f; outline-offset: 1px; }
.stella-custom-name { position: absolute; top: 12.5%; left: 10%; width: 80%; overflow: hidden; color: #fff9d9; font-size: 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap; z-index: 1; }
.stella-custom-art { position: absolute; top: 23%; left: 20%; width: 60%; height: 43%; object-fit: contain; }
.stella-custom-code { position: absolute; bottom: 15%; color: #fff; font-size: 10px; font-weight: 900; }
.stella-custom-zero { position: absolute; bottom: 5%; color: #dfca69; font-size: 7px; }
.stella-custom-slot-number { color: #a99bcf; font-size: 14px; font-weight: 800; }
.stella-custom-remove { position: absolute; right: 0; bottom: 0; width: 24px; height: 22px; padding: 0; border: 1px solid #665b94; border-radius: 4px; background: #23203e; }
.stella-custom-dialog footer { padding-top: 12px; text-align: right; }
.stella-custom-dialog footer p { min-height: 38px; color: #d3cee5; font-size: 12px; line-height: 1.6; text-align: left; }
.stella-custom-dialog [data-save]:enabled { border-color: #d9c45f; background: #574f2c; color: #fff9d6; }
@media (max-width: 640px) {
    #boardgame-stella-section .stella-title-row { min-height: 40px; padding-top: 56px; }
    #boardgame-stella-section .stella-entry-toggle { top: auto; bottom: 0; transform: none; }
    .stella-custom-control { left: 6px; }
    .stella-custom-dialog { padding: 12px; }
    .stella-custom-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stella-custom-slots { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
    .stella-custom-name { font-size: 5px; }
    .stella-custom-code { font-size: 7px; }
    .stella-custom-zero { font-size: 5px; }
}
