.ftc-section {
    --ftc-surface:     #ffffff;
    --ftc-panel:       #faf8f6;
    --ftc-track:       #f3efeb;
    --ftc-line:        #e5dfd9;
    --ftc-text:        #1f1b18;
    --ftc-muted:       #6e655f;
    --ftc-soft:        #9c928b;
    --ftc-accent:      #8c523e;
    --ftc-accent-soft: #f5ece8;
    --ftc-sec:         #6b705c;
    --ftc-sec-soft:    #f2f3ef;
    padding: 20px 0;
    color: var(--ftc-text);
    font-family: var(--font, "Inter", Arial, sans-serif);
}

.ftc-section *,
.ftc-section *::before,
.ftc-section *::after {
    box-sizing: border-box;
}

.ftc-section [hidden] {
    display: none !important;
}

.ftc-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.ftc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ftc-sr-copy {
    position: fixed;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

/* Shell */
.ftc {
    overflow: hidden;
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(31, 27, 24, 0.06);
}

/* Top bar */
.ftc-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    background: #fcfbfa;
    border-bottom: 1px solid var(--ftc-line);
}

.ftc-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.ftc-seg {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: var(--ftc-track);
    border: 1px solid var(--ftc-line);
    border-radius: 10px;
    max-width: 100%;
}

.ftc-seg-btn {
    flex: 0 0 auto;
    padding: 5px 11px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ftc-muted);
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ftc-seg-btn:hover {
    color: var(--ftc-text);
}

.ftc-seg-btn.is-active {
    color: #ffffff;
    background: var(--ftc-accent);
    box-shadow: 0 2px 6px rgba(140, 82, 62, 0.28);
}

.ftc-seg--qb .ftc-seg-btn.is-active {
    background: var(--ftc-sec);
    box-shadow: 0 2px 6px rgba(107, 112, 92, 0.28);
}

.ftc-dd {
    display: none;
}

.ftc-select {
    height: 36px;
    padding: 0 26px 0 10px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ftc-text);
    background-color: var(--ftc-track);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236e655f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    border: 1px solid var(--ftc-line);
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.ftc-reset {
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ftc-muted);
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.ftc-reset:hover {
    background: var(--ftc-accent-soft);
    color: var(--ftc-accent);
}

.ftc-seg-btn:focus-visible,
.ftc-select:focus-visible,
.ftc-reset:focus-visible,
.ftc-search:focus-visible,
.ftc-val-input:focus-visible,
.ftc-remove:focus-visible,
.ftc-copy:focus-visible {
    outline: 2px solid var(--ftc-accent);
    outline-offset: 2px;
}

/* Two-column body */
.ftc-body {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

/* Left: team sides */
.ftc-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.ftc-side {
    background: var(--ftc-panel);
    border: 1px solid var(--ftc-line);
    border-radius: 12px;
    padding: 12px;
}

.ftc-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ftc-side-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ftc-text);
}

.ftc-side-total {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ftc-accent);
    background: var(--ftc-accent-soft);
    padding: 2px 9px;
    border-radius: 99px;
    font-variant-numeric: tabular-nums;
}

/* Search dropdown */
.ftc-search-wrap {
    position: relative;
}

.ftc-search {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ftc-text);
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 9px;
}

.ftc-search::placeholder {
    color: var(--ftc-soft);
}

.ftc-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 220px;
    overflow-y: auto;
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(31, 27, 24, 0.12);
}

.ftc-sug-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.8125rem;
    color: var(--ftc-text);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ftc-line);
    cursor: pointer;
    text-align: left;
}

.ftc-sug-btn:last-child {
    border-bottom: 0;
}

.ftc-sug-btn:hover {
    background: var(--ftc-accent-soft);
}

.ftc-sug-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ftc-sug-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ftc-sug-val {
    font-weight: 700;
    color: var(--ftc-accent);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Asset list */
.ftc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.ftc-list:empty {
    display: none;
}

.ftc-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 74px 30px;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 9px;
}

.ftc-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 6px;
    color: var(--ftc-accent);
    background: var(--ftc-accent-soft);
}

.ftc-pos--pick {
    color: var(--ftc-sec);
    background: var(--ftc-sec-soft);
}

.ftc-item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ftc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ftc-val-input {
    width: 100%;
    height: 30px;
    padding: 0 6px;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ftc-text);
    text-align: right;
    background: var(--ftc-panel);
    border: 1px solid var(--ftc-line);
    border-radius: 7px;
    font-variant-numeric: tabular-nums;
}

.ftc-remove {
    width: 30px;
    height: 30px;
    padding: 0;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ftc-muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ftc-remove:hover {
    background: var(--ftc-accent-soft);
    color: var(--ftc-accent);
}

.ftc-hint {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--ftc-muted);
    text-align: center;
}

/* Right: result */
.ftc-result {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px;
    background: var(--ftc-panel);
    border-left: 1px solid var(--ftc-line);
}

.ftc-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ftc-result-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ftc-text);
}

.ftc-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ftc-text);
    cursor: pointer;
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.ftc-copy:hover:not(:disabled) {
    background: var(--ftc-accent-soft);
    color: var(--ftc-accent);
}

.ftc-copy:disabled {
    cursor: not-allowed;
    color: var(--ftc-soft);
}

.ftc-icon {
    display: block;
    flex: 0 0 auto;
}

/* Empty state */
.ftc-empty {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    text-align: center;
}

.ftc-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--ftc-accent);
    background: var(--ftc-accent-soft);
    border-radius: 12px;
}

.ftc-empty-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ftc-muted);
}

/* Verdict & Meter */
.ftc-verdict {
    margin: 0;
    font-size: clamp(1.5rem, 3.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ftc-accent);
    line-height: 1.15;
}

.ftc-meta {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: var(--ftc-muted);
}

.ftc-meter {
    display: flex;
    height: 10px;
    margin-top: 14px;
    border-radius: 99px;
    overflow: hidden;
    background: var(--ftc-line);
}

.ftc-meter-a {
    background: var(--ftc-accent);
    transition: width 0.2s ease;
}

.ftc-meter-b {
    background: var(--ftc-sec);
    transition: width 0.2s ease;
}

/* Stats */
.ftc-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 0;
}

.ftc-stat {
    padding: 10px;
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 10px;
}

.ftc-stat dt {
    margin: 0 0 3px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ftc-muted);
}

.ftc-stat dd {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ftc-text);
    font-variant-numeric: tabular-nums;
}

.ftc-note {
    margin: 10px 0 0;
    padding: 8px 10px;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #7c4a2d;
    background: var(--ftc-accent-soft);
    border: 1px solid #ead9d2;
    border-radius: 8px;
}

/* Table */
.ftc-table {
    width: 100%;
    margin-top: 14px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--ftc-surface);
    border: 1px solid var(--ftc-line);
    border-radius: 10px;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.ftc-table th,
.ftc-table td {
    padding: 8px 12px;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--ftc-line);
}

.ftc-table thead th {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--ftc-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--ftc-panel);
    text-align: left;
}

.ftc-table thead th:not(:first-child),
.ftc-table tbody td {
    text-align: right;
}

.ftc-table tbody th {
    text-align: left;
    font-weight: 600;
    color: var(--ftc-muted);
}

.ftc-table tbody td {
    font-weight: 700;
    color: var(--ftc-text);
}

.ftc-table tbody tr:last-child th,
.ftc-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Responsive */
@media (max-width: 860px) {
    .ftc-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .ftc-result {
        border-top: 1px solid var(--ftc-line);
        border-left: 0;
    }

    .ftc-empty {
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .ftc-wrap {
        padding: 0 10px;
    }

    .ftc-seg--league,
    .ftc-seg--scoring {
        display: none;
    }

    .ftc-dd {
        display: block;
    }
}

@media (max-width: 600px) {
    .ftc-section {
        padding: 14px 0;
    }

    .ftc-bar {
        padding: 10px;
        gap: 6px;
    }

    .ftc-bar-left {
        flex: 1 1 auto;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .ftc-dd {
        flex: 1 1 0;
        min-width: 0;
    }

    .ftc-dd .ftc-select {
        width: 100%;
    }

    .ftc-seg--qb .ftc-seg-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .ftc-inputs,
    .ftc-result {
        padding: 12px;
        gap: 10px;
    }

    .ftc-stats {
        gap: 6px;
    }

    .ftc-stat {
        padding: 8px;
    }
}