.mf-result-browser { width: 100%; }
.mf-result-browser [hidden] { display: none !important; }
.mf-main {
    width: calc(100% - 32px);
    max-width: 1248px;
    margin: 40px auto;
    padding: 28px;
    border: 1px solid #e9deee;
    border-radius: 24px;
    background: linear-gradient(145deg, #faf6ff, #fff8fb 65%, #f8f7fc);
    color: #2c2139;
    scroll-margin-top: 96px;
}

.mf-main, .mf-main * { box-sizing: border-box; }
.mf-main [hidden] { display: none !important; }
.mf-main__header { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.mf-main__eyebrow { margin: 0 0 10px; color: #6f467e; font-size: 12px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
.mf-main h2 { margin: 0; color: #2c1645; font-size: clamp(32px, 4vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -1.3px; }
.mf-main h2 > span { color: #cf246c; }
.mf-main__intro { margin: 12px 0 0; color: #62566c; font-size: 15px; line-height: 1.6; }
.mf-main__total { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 100px; padding: 13px 18px; border: 1px solid #e6d9ed; border-radius: 16px; background: #fff; }
.mf-main__total strong { color: #572785; font-size: 30px; line-height: 1.2; }
.mf-main__total span { margin-top: 4px; color: #716479; font-size: 12px; }

.mf-main__tabs { display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; margin: 24px 0; padding: 5px; border: 1px solid #e6dcec; border-radius: 13px; background: #fff; }
.mf-main__tabs a { padding: 11px 18px; border-radius: 9px; color: #63466f; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.4; }
.mf-main__tabs a[aria-current] { color: #fff; background: #592a83; box-shadow: 0 3px 8px #57278520; }
.mf-main__tabs a:not([aria-current]):hover { background: #f4edf9; color: #592a83; }
.mf-main__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 20px; }
.mf-main__guide p { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #382746; }
.mf-main__guide span { color: #6c5e76; font-size: 12px; line-height: 1.6; }
.mf-main__search { width: 100%; margin: 0 0 24px; padding: 20px; border: 1px solid #d7c0e7; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px #57278508; }
.mf-main__search label { display: block; margin-bottom: 5px; font-size: 18px; color: #422158; font-weight: 700; }
.mf-main__search label > span { display: inline-block; margin-left: 10px; color: #746080; font-size: 15px; font-weight: 500; }
.mf-main__search-hint { margin: 0 0 14px; color: #72627c; font-size: 13px; line-height: 1.6; }
.mf-main__search-row { display: flex; align-items: stretch; gap: 10px; }
.mf-main__search-field { position: relative; min-width: 0; flex: 1; }
.mf-main__search-field svg { position: absolute; left: 14px; top: 17px; width: 20px; height: 20px; fill: none; stroke: #80688e; stroke-width: 1.8; pointer-events: none; }
.mf-main__search input { appearance: none; width: 100%; height: 54px; padding: 12px 44px 12px 42px; border: 1px solid #b89dcb; border-radius: 10px; background: #fff; color: #2c2139; font: inherit; font-size: 16px; }
.mf-main__search input::placeholder { color: #83758d; }
.mf-main__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.mf-main__clear { position: absolute; right: 1px; top: 5px; width: 44px; height: 44px; border: 0; border-radius: 9px; color: #61416f; background: transparent; font-size: 26px; cursor: pointer; }
.mf-main__clear:hover { background: #f4edf9; }
.mf-main__submit { flex: 0 0 auto; min-width: 120px; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 10px; color: #fff; background: #592a83; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.mf-main__submit:hover { background: #42205f; }
.mf-main__search-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 12px; }
.mf-main__search-status { margin: 0; color: #63466f; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.mf-main__reset { min-height: 44px; padding: 8px 0; border: 0; color: #633481; background: transparent; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mf-main-card, .mf-main__no-match, #market-search,
.mf-result-browser .mf-extra-results__card { scroll-margin-top: 110px; }
.mf-main-card:focus, .mf-main__no-match:focus,
.mf-result-browser .mf-extra-results__card:focus,
.mf-result-browser .mf-extra-results:focus { outline: 2px solid #8b48b9; outline-offset: 3px; }
.mf-main a:focus-visible, .mf-main button:focus-visible, .mf-main input:focus-visible { outline: 3px solid #8b48b9; outline-offset: 3px; }

.mf-main__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mf-main-card { min-width: 0; padding: 20px 18px 16px; border: 1px solid #e5dbe9; border-top: 3px solid #8d57aa; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px #3e175308; }
.mf-main-card__header h3 { margin: 0 0 8px; color: #342342; font-size: 18px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.mf-main-card__status { display: inline-flex; align-items: center; gap: 6px; color: #34745e; font-size: 12px; font-weight: 600; line-height: 1.4; }
.mf-main-card__status > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mf-main-card__status--partial { color: #916011; }
.mf-main-card__status--pending { color: #746a7b; }
.mf-main-card__numbers { display: grid; grid-template-columns: minmax(0, 1fr) 10px minmax(0, .9fr) 10px minmax(0, 1fr); align-items: center; gap: 3px; margin: 18px 0; text-align: center; }
.mf-main-card__numbers > div { min-width: 0; padding: 10px 0; }
.mf-main-card__numbers strong { display: block; color: #302039; font-size: clamp(28px, 2.8vw, 36px); line-height: 1.25; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.mf-main-card__numbers > div > span { display: block; margin-top: 4px; color: #766580; font-size: 12px; line-height: 1.5; font-weight: 600; white-space: nowrap; }
.mf-main-card__numbers .mf-main-card__jodi { border-radius: 12px; background: #f7edf6; }
.mf-main-card__jodi strong { color: #992462; }
.mf-main-card__numbers .mf-main-card__jodi > span { color: #8e386b; }
.mf-main-card__divider { color: #b4a4be; font-size: 16px; transform: translateY(-9px); }
.mf-main-card__numbers .mf-main-card__raw-result { grid-column: 1 / -1; font-size: 30px; overflow-wrap: anywhere; }
.mf-main-card__times { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 16px; padding: 12px 0; border-top: 1px solid #f0e9f3; border-bottom: 1px solid #f0e9f3; }
.mf-main-card__times > div { min-width: 0; text-align: center; }
.mf-main-card__times > div + div { border-left: 1px solid #e9e0ee; }
.mf-main-card__times dt { margin: 0 0 4px; color: #776780; font-size: 12px; font-weight: 400; }
.mf-main-card__times dd { margin: 0; color: #463250; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mf-main-card__charts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mf-main-card__charts a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 8px; border: 1px solid #dfd0e8; border-radius: 9px; color: #633481; background: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.mf-main-card__charts a:hover { color: #fff; background: #633481; border-color: #633481; }
.mf-main-card__charts a span { font-size: 17px; line-height: 1; }
.mf-main__empty { padding: 32px 20px; border: 1px dashed #d8c6e2; border-radius: 14px; background: #fff; color: #675472; text-align: center; line-height: 1.7; }

@media (max-width: 1099px) {
    .mf-main__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mf-main-card__numbers strong { font-size: 36px; }
}
@media (max-width: 359px) {
    .mf-main h2 { font-size: 28px; letter-spacing: -1px; }
    .mf-main-card__charts a { gap: 5px; padding: 10px 6px; font-size: 12px; }
}
@media (max-width: 699px) {
    .mf-main { width: calc(100% - 24px); margin: 24px auto; padding: 20px 14px; border-radius: 18px; }
    .mf-main__header { gap: 12px; align-items: flex-start; }
    .mf-main__eyebrow { font-size: 10px; letter-spacing: .6px; line-height: 1.6; }
    .mf-main__intro { font-size: 13px; }
    .mf-main__total { min-width: 65px; padding: 10px 8px; border-radius: 12px; }
    .mf-main__total strong { font-size: 24px; }
    .mf-main__total span { font-size: 10px; }
    .mf-main__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 3px; margin: 20px 0; padding: 4px; }
    .mf-main__tabs a { padding: 10px 5px; font-size: 12px; text-align: center; }
    .mf-main__toolbar { align-items: stretch; flex-direction: column; gap: 14px; }
    .mf-main__search { padding: 15px; }
    .mf-main__search label > span { margin-left: 0; display: block; margin-top: 4px; }
    .mf-main__search-row { flex-direction: column; gap: 9px; }
    .mf-main__submit { width: 100%; }
    .mf-main__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .mf-main-card { padding: 18px 16px 14px; }
    .mf-main-card__numbers strong { font-size: clamp(29px, 8.7vw, 40px); }
}

.mf-main .mf-extra-results { margin: 0; padding: 0; }
.mf-main .mf-extra-results__heading h2 { font-size: clamp(24px, 4vw, 36px); line-height: 1.2; letter-spacing: normal; }
