.fc-shell {
    max-width: 560px;
    margin: 0 auto;
    padding: 12px 10px 28px;
    color: var(--cg-ink);
    font-family: Inter, Arial, sans-serif;
}

.fc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.fc-stats,
.fc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-stat {
    min-width: 60px;
    padding: 7px 9px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.fc-stat span,
.fc-hud-card span {
    display: block;
    color: var(--cg-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fc-stat strong,
.fc-hud-card strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    line-height: 1;
}

.fc-btn {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    color: var(--cg-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.fc-btn:hover {
    border-color: var(--cg-teal);
    transform: translateY(-1px);
}

.fc-btn:active {
    transform: translateY(0);
}

.fc-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.fc-icon-btn svg {
    width: 20px;
    height: 20px;
}

.fc-primary {
    background: var(--cg-green);
    border-color: var(--cg-green);
    color: #fff;
}

.fc-primary:hover {
    border-color: var(--cg-green);
    filter: brightness(1.08);
}

.fc-hud {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.fc-hud-card {
    padding: 8px 10px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.fc-bar {
    height: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 99px;
    background: #dfe5e0;
}

.fc-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cg-teal), var(--cg-green));
    transition: width 0.18s ease;
}

.fc-bar .fc-bar-full {
    background: linear-gradient(90deg, #22c55e, #facc15);
}

.fc-stage {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 18px;
    box-shadow: var(--cg-shadow);
}

#fc-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    touch-action: none;
    outline: none;
    cursor: crosshair;
}

#fc-canvas:focus-visible {
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.75);
}

.fc-status {
    min-height: 22px;
    margin: 11px 2px 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.fc-controls {
    display: flex;
    gap: 8px;
}

.fc-wide {
    flex: 1;
    min-width: 90px;
}

.fc-result {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--cg-line);
    border-radius: 12px;
    background: var(--cg-panel);
    box-shadow: var(--cg-shadow);
    text-align: center;
    animation: fc-rise 0.25s ease;
}

@keyframes fc-rise {
    from { opacity: 0; transform: translateY(8px); }
}

.fc-result-kicker {
    display: block;
    color: var(--cg-teal);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fc-result strong {
    display: block;
    margin: 4px 0 2px;
    font-size: 1.3rem;
}

.fc-result p {
    margin: 0 0 12px;
    color: var(--cg-muted);
    font-size: 0.9rem;
}

.fc-result-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fc-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 26, 30, 0.6);
}

.fc-modal-card {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--cg-panel);
    border: 1px solid var(--cg-line);
    box-shadow: var(--cg-shadow);
}

.fc-modal-card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.fc-modal-card p {
    margin: 0 0 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.fc-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--cg-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.fc-close:hover {
    color: var(--cg-ink);
    background: var(--cg-bg);
}

@media (max-width: 640px) {
    .fc-shell {
        padding: 8px 6px 22px;
    }

    .fc-stat {
        min-width: 52px;
        padding: 6px 7px;
    }

    .fc-stat strong,
    .fc-hud-card strong {
        font-size: 15px;
    }

    .fc-hud {
        gap: 6px;
    }

    .fc-hud-card {
        padding: 7px 8px;
    }

    .fc-btn {
        padding: 9px 8px;
        font-size: 0.82rem;
    }

    .fc-status {
        font-size: 0.84rem;
    }
}
